Created
February 11, 2025 23:58
-
-
Save tin2tin/ab7bfb6f17bfdba7bc6ee5faf5ad3ae4 to your computer and use it in GitHub Desktop.
Strip picker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
from bpy.props import StringProperty | |
class TEST_PT_layout_panel(bpy.types.Panel): | |
bl_label = "VSE Strip Picker" | |
bl_category = "Test Panel" | |
bl_space_type = 'PROPERTIES' | |
bl_region_type = 'WINDOW' | |
bl_context = "scene" | |
def draw(self, context): | |
scene = context.scene | |
layout = self.layout | |
col = layout.column() | |
col.prop_search(scene, "prop", scene.sequence_editor, "sequences", text="Pick Strip") | |
if scene.prop in scene.sequence_editor.sequences: | |
col.label(text=f"Selected: {scene.prop}") | |
def register(): | |
bpy.types.Scene.prop = StringProperty(name="Selected Strip") | |
bpy.utils.register_class(TEST_PT_layout_panel) | |
def unregister(): | |
bpy.utils.unregister_class(TEST_PT_layout_panel) | |
del bpy.types.Scene.prop | |
if __name__ == "__main__": | |
register() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment