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
This commit is contained in:
Nate Rupsis 2022-09-13 15:05:01 +02:00 committed by Sybren A. Stüvel
parent 34051fcc12
commit b6ebd5591c
Notes: blender-bot 2023-04-04 06:48:06 +02:00
Referenced by issue #101275, Regression: Edited action in NLA ignored settings
Referenced by issue #106337, Can't Find "Edited Action" Side Bar in NLA Editor
1 changed files with 8 additions and 2 deletions

View File

@ -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;
}