diff options
author | Colin Basnett <cmbasnett> | 2022-06-23 12:11:53 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2022-06-23 12:12:42 +0300 |
commit | 57816a6435c3a6efc98c575ec0a02ad0dd07622c (patch) | |
tree | 952ca4bb5f85778cd1348e42d1a06aa84c2b2beb /release | |
parent | d8e9647ae26b1681f1a2345975e52c512ff15e20 (diff) |
Dopesheet: Add Custom Properties panel
Adds a custom property panel for the active `Action` to the Dopesheet
editor. There was previously no way to edit these properties outside of
the Python API.
This panel will show up when
`context.active_object.animation_data.action` is set.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D14646
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 3d792eec3e0..d4b55d5e536 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -15,6 +15,8 @@ from bl_ui.properties_grease_pencil_common import ( GreasePencilLayerDisplayPanel, ) +from rna_prop_ui import PropertyPanel + ####################################### # DopeSheet Filtering - Header Buttons @@ -544,6 +546,20 @@ class DopesheetActionPanelBase: col.prop(action, "use_cyclic") +class DOPESHEET_PT_custom_props_action(PropertyPanel, Panel): + bl_space_type = 'DOPESHEET_EDITOR' + bl_region_type = 'UI' + bl_context = 'data' + _context_path = "active_object.animation_data.action" + _property_type = bpy.types.Action + + @classmethod + def poll(cls, context): + return context.active_object \ + and context.active_object.animation_data \ + and context.active_object.animation_data.action + + class DOPESHEET_PT_action(DopesheetActionPanelBase, Panel): bl_space_type = 'DOPESHEET_EDITOR' bl_category = "Item" @@ -817,6 +833,7 @@ classes = ( DOPESHEET_PT_gpencil_layer_adjustments, DOPESHEET_PT_gpencil_layer_relations, DOPESHEET_PT_gpencil_layer_display, + DOPESHEET_PT_custom_props_action, ) if __name__ == "__main__": # only for live edit. |