I’m trying to write a script to copy image properties from the a node in the compositor to the background image of a 3D viewport.
By naming the image node and the background, I’ve managed to change the image in the 3D view e.g.
>>> bpy.data.images["background_b"].filepath = bpy.data.images["Moon.b1"].filepath
However, I’m stuck with the start frame and offset, which seem to be properties of ImageUser. The tooltip says
>>> bpy.data.screens["Animation.back"]..frame_start
which, as far as I understand, means I need to put something between [“Animation.back”] and .frame_start but what is it?
Can anyone tell me the proper syntax to reference:
a) the frame_start and frame_offset for the background in a 3D viewport, and
b) those same properties from an image node in the compositor?
Any pointers would be much appreciated.
UPDATE: I’ve worked out the node references - e.g.
>>> bpy.data.scenes['Ship.back'].node_tree.nodes["Moon.b1"].frame_offset
Now I just need the referenceS to the 3D viewport background.