Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Query final render end frame driven by a clip via python

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
andyhayXR9GZ
312 Views, 2 Replies

Query final render end frame driven by a clip via python

 

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  

2 REPLIES 2
Message 2 of 3

Hi Andy,

 

This command can be used to generate a corresponding range.

getRenderOutputFilenames()

 

Message 3 of 3

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.

Post to forums  

Autodesk Design & Make Report