Is there any way to set the frame rendering range based on the Movie Clip input node (using a script)? I would like to automatically render different movie files, but in order to do that I need to correctly set the rendering range to cover the entire movies duration in number of frames. I tried looking for a parameter in Movie Clip node that would perhaps contain the clip duration, or frame count, but I wasn't able to find anything like that. Is there perhaps a different way this can be achieved?
1 Answer
Turns out I just wasn't accessing the right object type. The movie clip node contains a clip parameter, which contains the data I needed. The frame end range can then be set like this:
frameCount = bpy.data.scenes['Scene'].node_tree.nodes["MovieClip"].clip.frame_duration
bpy.context.scene.frame_end = frameCount
Full specification of the MovieClip datatype can be found here