Commit: 57816a6435c3a6efc98c575ec0a02ad0dd07622c Author: Colin Basnett Date: Thu Jun 23 11:11:53 2022 +0200 Branches: master https://developer.blender.org/rB57816a6435c3a6efc98c575ec0a02ad0dd07622c
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 =================================================================== M release/scripts/startup/bl_ui/space_dopesheet.py =================================================================== 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. _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs