Jump to content

How to find last stage/frame index used in the project with python?


Recommended Posts

Im writing a script to go through each frame and export measurements to csv file. How can I return the last stage/frame index number defined in a project? Ive tried "gom.app.project.current_stage_range" but that is empty. 

Is there a list/manual for the python parameters? its very confusing to randomly search for teh term you need in teh "Insert Element Value" window.

Thanks.

Hello Mark,

you can access the last element with the index -1 in python, for example or you could get the length of the list for the number of stages

print(gom.app.project.stages[-1])
print(len(gom.app.project.stages))

There is a free training for python in the training center "PY4E Python for Beginners" but you can use any source you like, since it is standard python syntax.

Nanno

×
×
  • Create New...