How to get the value for playback in and out point in Natron with python?
But I need the red range of the timeline where it will loop (playback in and out point).
Thanks in advance.
How to get the value for playback in and out point in Natron with python?
But I need the red range of the timeline where it will loop (playback in and out point).
Thanks in advance.
Thanks man. Here is the code for reference:
app=app1
pane1 = app.getViewer("Viewer1")
range= pane1.getFrameRange()
print (range) # Tuple Range
print (range[0]) #First frame in range
print (range[1]) #Last frame in range
Gotcha:
To get a PyViewer , use the getViewer(scriptName)
function, passing it the script-name of a viewer node.
If you were to use this piece of code in a python tool, you would have to tweak it a bit.
’ app =app1’ is useless for example.
Plus, you don’t know what the viewer’s name would be.
So you’d better use the ‘getPluginID()’ function.
Here an example :
Thanks. Will be very valuable for my research