1
$\begingroup$

I have this piece of Python code:

import bpy
import os

# switch on nodes
bpy.context.scene.use_nodes = True
tree = bpy.context.scene.node_tree

# Clear default nodes
for node in tree.nodes:
    tree.nodes.remove(node)

# Create input image node
image_node = tree.nodes.new(type='CompositorNodeImage')
file_path = "C:\\DEV\\testSequence.1114.exr"
image_node.image = bpy.data.images.load(file_path)
image_node.frame_duration = 200
image_node.frame_start = 1114
image_node.frame_offset = 1114
image_node.location = 0,0

This script makes a node in the compositor tree and loads the file in C:/DEV/testSequence.1114.exr; however, instead of 'Single Image', I want to switch to 'Image Sequence'. how can do this in script?

$\endgroup$
0
$\begingroup$

Switching from still to sequence is actually part of the image data not the node itself. After you load the image used by the node you can set it's source to 'SEQUENECE'

image_node.image.source = 'SEQUENCE'
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.