i'm trying to write a little addon for the sequencer in blender. I want to create a kind of custom category of clip easily accessible through ui panel (like "reference clip" which are not going to be rendered, for example) I'm trying to use custom property for this, so long so good for iterate and finding them through the timeline, but i'm having hard time at creating the custom property through python... Here's what i've got so far :
import bpy
scene = bpy.context.scene
strip = scene.sequence_editor.sequences_all
activeST = scene.sequence_editor.active_strip
if activeST is not None:
if len(activeST.keys()) > 1:
for CP in activeST.keys():
if CP in "___reference_strip":
print("Active strip is already a Reference Strip")
else :
activeST['___reference_strip'] = 1.000
else :
activeST['___reference_strip'] = 1.000
After creating the property with this piece of code, i'm trying to perform action, like mute strip with this property :
scene = bpy.context.scene
strip = scene.sequence_editor.sequences_all
for S in strip:
if len(S.keys()) > 1:
for CP in S.keys():
if CP in "___reference_strip":
S.mute = True
the custom property is created, but doesn't seem to be active, but the code above doesn't select mute the clip with it, i have to manually edit it to make it work...
Any help to find the origin of the problem would be greatly appreciated :D
is_ref = "__reference_strip" in active_strip.keys()
$\endgroup$activeST['___reference_strip' = 1.000
, but property created seems inactive... Is it clearer ? :) $\endgroup$