2
$\begingroup$

I wanted to check if any camera is binded to the current marker. For that I thought I would simply compare the marker's name with the active camera's name (bpy.data.scenes["Scene"].camera). But cant't understand how to get the current marker's name.

$\endgroup$

1 Answer 1

2
$\begingroup$

Each marker has a camera and a name property. Easy to figure out using the python console:

>>> C.scene.timeline_markers['F_01'].
                                     as_pointer(
                                     bl_rna
                                     camera
                                     ...
                                     name
                                     ...

To get the cameras just iterate through the markers:

>>> for m in C.scene.timeline_markers:
...     print ("Marker name:", m.name)
...     print ("Camera object:", m.camera)
...     print ("Camera name:", m.camera.name)
...     
Marker name: F_01
Camera object: <bpy_struct, Object("Camera")>
Camera name: Camera
$\endgroup$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .