From b6ebd5591c7f0e7037a2af66b5e1d96125834949 Mon Sep 17 00:00:00 2001 From: Nate Rupsis Date: Tue, 13 Sep 2022 15:05:01 +0200 Subject: 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 --- source/blender/editors/space_nla/nla_buttons.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; } -- cgit v1.2.3