diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-17 14:43:02 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-17 14:43:27 +0300 |
commit | 6770f76bd49f0104e51d2c8a523e880f0c40cf7a (patch) | |
tree | f2b49e710409736f934180f4448f0fd3cf74fd4c /source/blender | |
parent | 05b8b540184555287a7579c9734158bf29e0fccb (diff) |
Fix T60982: don't allow editing group properties in linked actions.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 12 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 7 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index a4fc022821a..67d0e969735 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -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); + } + } + } } } diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index c2878a64e97..67ec5a95913 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -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) { diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 2687183166b..b5891a03f0a 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -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); } } |