Fix T60982: don't allow editing group properties in linked actions.
This commit is contained in:
parent
05b8b54018
commit
6770f76bd4
|
@ -4630,12 +4630,14 @@ static void draw_setting_widget(bAnimContext *ac,
|
|||
UI_but_func_set(but, achannel_setting_widget_cb, NULL, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((ale->fcurve_owner_id != NULL && ID_IS_LINKED(ale->fcurve_owner_id)) ||
|
||||
(ale->id != NULL && ID_IS_LINKED(ale->id))) {
|
||||
UI_but_flag_enable(but, UI_BUT_DISABLED);
|
||||
if ((ale->fcurve_owner_id != NULL && ID_IS_LINKED(ale->fcurve_owner_id)) ||
|
||||
(ale->id != NULL && ID_IS_LINKED(ale->id))) {
|
||||
if (setting != ACHANNEL_SETTING_EXPAND) {
|
||||
UI_but_flag_enable(but, UI_BUT_DISABLED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2586,6 +2586,13 @@ static bool rename_anim_channels(bAnimContext *ac, int channel_index)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* don't allow renaming linked channels */
|
||||
if ((ale->fcurve_owner_id != NULL && ID_IS_LINKED(ale->fcurve_owner_id)) ||
|
||||
(ale->id != NULL && ID_IS_LINKED(ale->id))) {
|
||||
ANIM_animdata_freelist(&anim_data);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* check that channel can be renamed */
|
||||
acf = ANIM_channel_get_typeinfo(ale);
|
||||
if (acf && acf->name_prop) {
|
||||
|
|
|
@ -1344,7 +1344,7 @@ static size_t animfilter_act_group(bAnimContext *ac,
|
|||
/* filter selection of channel specially here again,
|
||||
* since may be open and not subject to previous test */
|
||||
if (ANIMCHANNEL_SELOK(SEL_AGRP(agrp))) {
|
||||
ANIMCHANNEL_NEW_CHANNEL(agrp, ANIMTYPE_GROUP, owner_id, NULL);
|
||||
ANIMCHANNEL_NEW_CHANNEL(agrp, ANIMTYPE_GROUP, owner_id, &act->id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue