diff options
author | Nate Rupsis <nrupsis> | 2022-09-13 16:05:01 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2022-09-13 16:09:06 +0300 |
commit | b6ebd5591c7f0e7037a2af66b5e1d96125834949 (patch) | |
tree | 78d4fde59f52585529f323f7f69a447d192338a0 | |
parent | 34051fcc12f388375697dcfc6da53e9909058fe1 (diff) |
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
-rw-r--r-- | source/blender/editors/space_nla/nla_buttons.c | 10 |
1 files 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; } |