Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2022-06-24 17:08:54 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2022-07-20 14:18:17 +0300
commit054a169be04850c9356917904e04cdf24a73e04c (patch)
treed853cfe8304bdc086459373e41dc7ef636d955f7 /release
parentae49e0e8be590dfbf6604d19f862931380bf1bdd (diff)
Use appropriate context for the DopeSheet Action Custom Properties panel.
Refactor D14646 to use context.active_action for the Action Custom Properties panel, matching the already existing Action panel. This has the advantage that it allows access to the properties of any actions with channels visible in the Dope Sheet, e.g. Shape Keys, Materials etc; while using just the active object is limited to just the object animation. Also move both panels from Item to the Action tab. Differential Revision: https://developer.blender.org/D15288
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 4d1514c2777..a2e691c2d9f 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -548,22 +548,20 @@ class DopesheetActionPanelBase:
class DOPESHEET_PT_custom_props_action(PropertyPanel, Panel):
bl_space_type = 'DOPESHEET_EDITOR'
- bl_category = "Item"
+ bl_category = "Action"
bl_region_type = 'UI'
bl_context = 'data'
- _context_path = "active_object.animation_data.action"
+ _context_path = "active_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
+ return bool(context.active_action)
class DOPESHEET_PT_action(DopesheetActionPanelBase, Panel):
bl_space_type = 'DOPESHEET_EDITOR'
- bl_category = "Item"
+ bl_category = "Action"
@classmethod
def poll(cls, context):