1
$\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
$\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
| improve this answer | |
$\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.