I am looking to know the end frame of a render driven by a clip in 2022.3.
If I query :
start =getRenderStartFrame()
stop = getRenderStopFrame()
This gives me the animation start and stop frame, but if the render settings 'Use Clip Range' then those numbers remain unchanged ( but my clip has a different end value).
Is this correct? It would be nice if this respected clips?
I can query the logic of the render settings to determine which clip is being rendered:
if getRenderUseClipRange() :
render_clip_name = getRenderAnimationClip()
render_clip_node = findAnimClip(render_clip_name)
... but I see no method to extract the end frame? Is there a way I can get a clip's last frame ( e.g. to query the clip information to extract the 'End') ?
Thanks in Advance
Solved! Go to Solution.
Solved by __daniel.lincoln__. Go to Solution.
Hi Andy,
This command can be used to generate a corresponding range.
getRenderOutputFilenames()
Thanks Dan ! Yes that can work.
def extract_frame_range( input ):
# Create list of numbers derived from file frames
numbers = [ int(file.split(".")[-2].split('-')[-1]) for file in input]
# Sort files to be in order ( just in case)
numbers.sort()
# Return min and max frame number
return numbers[0] , numbers[-1]
def get_render_frame_range():
# Pull clip based ranges
if getRenderUseClipRange() :
return extract_frame_range( getRenderOutputFilenames() )
# Pull the explicit range
else:
return getRenderStartFrame(), getRenderStopFrame()
print (get_render_frame_range())
Thanks very much !
Can't find what you're looking for? Ask the community or share your knowledge.