Does anyone know how to get the name of the currently displayed ‘MovieClip datablock’ in the MovieClip editor?
Apparently, I need it to get the ‘Start Frame’ of the active datablock like this:
bpy.data.movieclips["what is the name"].frame_start
Thanks
CoDEmanX
(CoDEmanX)
2
there is not “one” active clip, every instance of a movieclip editor has one. You can get all from current screen like:
[area.spaces[0].clip.frame_start for area in bpy.context.screen.areas if area.type == 'CLIP_EDITOR' and area.spaces[0].clip is not None]
That does work.
for area in bpy.context.screen.areas:
if area.type == 'CLIP_EDITOR' and area.spaces[0].clip is not None:
print(area.spaces[0].clip.frame_start
Thanks:eyebrowlift:
CoDEmanX
(CoDEmanX)
4
well i love to write one liners recently 
“bpy.ops.” + “.”.join(bpy.context.active_operator.bl_idname.split("_", 2)[0::2]).lower()
…
locs_sorted.append(min((((l-loc).length_squared, i) for i, l in enumerate(locs_inner, j))))
…