Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-10-16 11:15:24 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-10-16 11:21:36 +0300
commitc5bdbc340a2113f15803115f6d3db72082a49473 (patch)
tree634f887554a569c5271ee539cfcc9bd820ea4569 /source/blender/editors/animation/anim_deps.c
parent5722de6098ab99a03c2a8469bef3efbec8232e00 (diff)
Fix T62463: unable to select anim channel for unselected node
Remove the code that synchronises selection state of shader node animation channels. This code is only used in a few cases where selection of these animation channels is changed, and then potentially does the wrong thing and disallows selection of animation channels altogether. This removal is meant to be a temporary situation, to unblock animation channel selection. See T74159 for the overall effort to improve selection sync.
Diffstat (limited to 'source/blender/editors/animation/anim_deps.c')
-rw-r--r--source/blender/editors/animation/anim_deps.c57
1 files changed, 2 insertions, 55 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 9e81880984b..b2225ec138f 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -233,57 +233,8 @@ static void animchan_sync_fcurve_scene(bAnimListElem *ale)
}
}
-static void animchan_sync_fcurve_nodetree(bAnimListElem *ale, FCurve **active_fcurve)
-{
- ID *owner_id = ale->id;
- BLI_assert(GS(owner_id->name) == ID_NT);
- bNodeTree *ntree = (bNodeTree *)owner_id;
- FCurve *fcu = (FCurve *)ale->data;
-
- /* check for selected nodes */
- if (!strstr(fcu->rna_path, "nodes")) {
- return;
- }
-
- /* get strip name, and check if this strip is selected */
- char *node_name = BLI_str_quoted_substrN(fcu->rna_path, "nodes[");
- bNode *node = nodeFindNodebyName(ntree, node_name);
- if (node_name) {
- MEM_freeN(node_name);
- }
- if (node == NULL) {
- return;
- }
-
- /* update selection status */
- if (node->flag & NODE_SELECT) {
- fcu->flag |= FCURVE_SELECTED;
- }
- else {
- fcu->flag &= ~FCURVE_SELECTED;
- }
-
- /* update active status */
- /* XXX: this may interfere with setting bones as active if both exist at once;
- * then again, if that's the case, production setups aren't likely to be animating
- * nodes while working with bones?
- */
- if (node->flag & NODE_ACTIVE) {
- if (*active_fcurve == NULL) {
- fcu->flag |= FCURVE_ACTIVE;
- *active_fcurve = fcu;
- }
- else {
- fcu->flag &= ~FCURVE_ACTIVE;
- }
- }
- else {
- fcu->flag &= ~FCURVE_ACTIVE;
- }
-}
-
/* perform syncing updates for F-Curves */
-static void animchan_sync_fcurve(bAnimListElem *ale, FCurve **active_fcurve)
+static void animchan_sync_fcurve(bAnimListElem *ale)
{
FCurve *fcu = (FCurve *)ale->data;
ID *owner_id = ale->id;
@@ -299,9 +250,6 @@ static void animchan_sync_fcurve(bAnimListElem *ale, FCurve **active_fcurve)
case ID_SCE:
animchan_sync_fcurve_scene(ale);
break;
- case ID_NT:
- animchan_sync_fcurve_nodetree(ale, active_fcurve);
- break;
default:
break;
}
@@ -340,7 +288,6 @@ void ANIM_sync_animchannels_to_data(const bContext *C)
int filter;
bActionGroup *active_agrp = NULL;
- FCurve *active_fcurve = NULL;
/* get animation context info for filtering the channels */
if (ANIM_animdata_get_context(C, &ac) == 0) {
@@ -364,7 +311,7 @@ void ANIM_sync_animchannels_to_data(const bContext *C)
break;
case ANIMTYPE_FCURVE:
- animchan_sync_fcurve(ale, &active_fcurve);
+ animchan_sync_fcurve(ale);
break;
case ANIMTYPE_GPLAYER: