Problems to extend TimelineMarker class


I need to extend the TimelimeMarker class with some properties, but my try returns strange results and will not work.

I’ve created a marker and renamed it to ‘MyMarker’ in the timeline. Then I added a new property to the TimelineMarker class.

import bpy
bpy.types.TimelineMarker.pause_on_reached = bpy.props.IntProperty()

if I test the type of the new property it returns tuple instead of <type int>

>>> type(bpy.context.scene.timeline_markers[‘MyMarker’].pause_on_reached)
<class ‘tuple’>

If I try to set the value of the new property I got an error:

>>> bpy.context.scene.timeline_markers[‘F_10’].pause_on_reached = 1
Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
AttributeError: ‘TimelineMarker’ object attribute ‘pause_on_reached’ is read-only

If I try the same on the Object Type or Scene Type for instance it works like intented and I can set values properly.

Don’t understand, where’s the difference.

Any pointers are welcome.

thanks. offtools.

Probably just doesn’t work on that, only on classes derived from ID does this work.

Yes, a little Yoda slipped in there…

At least I think it’s ID related, sound’s about right.

Thanks for the pointer. Will consult the manuals about that, have a clue now.

I’ve started to implement a TimelineMarkerEvent Collection, which stores the properties about timeline behaviour.