[Bf-blender-cvs] [b6ebd5591c7] master: NLA: Remove Edited Action tab from NLA panel

Nate Rupsis noreply at git.blender.org
Tue Sep 13 15:10:52 CEST 2022


Commit: b6ebd5591c7f0e7037a2af66b5e1d96125834949
Author: Nate Rupsis
Date:   Tue Sep 13 15:05:01 2022 +0200
Branches: master
https://developer.blender.org/rBb6ebd5591c7f0e7037a2af66b5e1d96125834949

NLA: Remove Edited Action tab from NLA panel

Removes the "Edited Action" tab for selected Action strips in the NLA
editor. It is still available in the Action editor, where it is actually
suitable/usable. Having it in the NLA got in the way of the actual NLA
strip properties.

Reviewed By: sybren, RiggingDojo

Differential Revision: https://developer.blender.org/D14964

===================================================================

M	source/blender/editors/space_nla/nla_buttons.c

===================================================================

diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 9652819404e..72b2eb20f8f 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -213,7 +213,8 @@ static bool nla_panel_poll(const bContext *C, PanelType *pt)
 static bool nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt))
 {
   PointerRNA ptr;
-  return (nla_panel_context(C, &ptr, NULL, NULL) && (ptr.data != NULL));
+  PointerRNA strip_ptr;
+  return (nla_panel_context(C, &ptr, NULL, &strip_ptr) && (ptr.data != NULL) && (ptr.owner_id != strip_ptr.owner_id));
 }
 
 static bool nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
@@ -265,13 +266,18 @@ static bool nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt))
 static void nla_panel_animdata(const bContext *C, Panel *panel)
 {
   PointerRNA adt_ptr;
+  PointerRNA strip_ptr;
   /* AnimData *adt; */
   uiLayout *layout = panel->layout;
   uiLayout *row;
   uiBlock *block;
 
   /* check context and also validity of pointer */
-  if (!nla_panel_context(C, &adt_ptr, NULL, NULL)) {
+  if (!nla_panel_context(C, &adt_ptr, NULL, &strip_ptr)) {
+    return;
+  }
+
+  if(adt_ptr.owner_id == strip_ptr.owner_id){
     return;
   }



More information about the Bf-blender-cvs mailing list