Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- def act_strip(context):
- try:
- return context.scene.sequence_editor.active_strip
- except AttributeError:
- return None
- class StripSettings(bpy.types.PropertyGroup):
- bpy.types.ImageSequence.fakeinput1 = bpy.props.PointerProperty(name="Input 1", type=bpy.types.Sequences)
- class LayoutDemoPanel( bpy.types.Panel):
- bl_label = "Offset"
- bl_options = {'DEFAULT_CLOSED'}
- bl_category = "Strip"
- bl_space_type = 'SEQUENCE_EDITOR'
- bl_region_type = 'UI'
- @staticmethod
- def has_sequencer(context):
- return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
- @classmethod
- def poll(cls, context):
- return cls.has_sequencer(context) and (act_strip(context) is not None)
- def draw_header(self, context):
- strip = act_strip(context)
- self.layout.prop(strip, "use_translation", text="")
- def draw(self, context):
- strip = act_strip(context)
- layout = self.layout
- layout.use_property_split = True
- layout.active = strip.use_translation and (not strip.mute)
- col = layout.column(align=True)
- col.prop(strip, "fakeinput1")
- def register():
- bpy.utils.register_class(CrossfadeStripSettings)
- bpy.utils.register_class(LayoutDemoPanel)
- def unregister():
- bpy.utils.unregister_class(LayoutDemoPanel)
- bpy.utils.unregister_class(StripSettings)
- if __name__ == "__main__":
- register()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement