diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-03-29 19:22:42 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-03-30 10:46:26 +0300 |
commit | fd10c21f51243921e645939e3f6a569c19864d8e (patch) | |
tree | 3cf02051eb3a3e00c671477a39e7a27a911d1bd2 /source/blender/editors | |
parent | 563d513e37b68431fe1006450e5736e763c70a7b (diff) |
Cleanup: animation, remove `BONE_UNKEYED` flag
Remove the `BONE_UNKEYED` flag. It was only written (set/cleared) but
never actually read.
Also remove `framechange_poses_clear_unkeyed()` as its only function was
to clear the `BONE_UNKEYED` flag. It wasn't used anywhere either.
The only code that used the flag was the `extract_pose_from_action()`,
which was removed in 2869ce6cfab3aa4ff471bef6e49ac6fe15426247 (2009).
No functional changes.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 10 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_lib.c | 11 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 13 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_utils.c | 5 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_convert_armature.c | 11 |
5 files changed, 0 insertions, 50 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 4cc0413be5b..9cbb799082c 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -3034,19 +3034,9 @@ bool ED_autokeyframe_pchan( ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); BLI_freelistN(&dsources); - /* clear any unkeyed tags */ - if (pchan->bone) { - pchan->bone->flag &= ~BONE_UNKEYED; - } - return true; } - /* add unkeyed tags */ - if (pchan->bone) { - pchan->bone->flag |= BONE_UNKEYED; - } - return false; } diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index dd90f9f2cc3..21fcbf8886b 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1108,17 +1108,6 @@ static void poselib_keytag_pose(bContext *C, Scene *scene, tPoseLib_PreviewData if (autokey) { /* Add data-source override for the PoseChannel, to be used later. */ ANIM_relative_keyingset_add_source(&dsources, &pld->ob->id, &RNA_PoseBone, pchan); - - /* clear any unkeyed tags */ - if (pchan->bone) { - pchan->bone->flag &= ~BONE_UNKEYED; - } - } - else { - /* add unkeyed tags */ - if (pchan->bone) { - pchan->bone->flag |= BONE_UNKEYED; - } } } } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 8d1c196e9c2..43ab20eb71c 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -172,9 +172,6 @@ static void applyarmature_transfer_properties(EditBone *curbone, unit_qt(pchan->quat); unit_axis_angle(pchan->rotAxis, &pchan->rotAngle); pchan->size[0] = pchan->size[1] = pchan->size[2] = 1.0f; - - /* Set anim lock. */ - curbone->flag |= BONE_UNKEYED; } /* Adjust the current edit position of the bone using the pose space matrix. */ @@ -1200,10 +1197,6 @@ static int pose_clear_transform_generic_exec(bContext *C, /* do auto-keyframing as appropriate */ if (autokeyframe_cfra_can_key(scene, &ob_iter->id)) { - /* clear any unkeyed tags */ - if (pchan->bone) { - pchan->bone->flag &= ~BONE_UNKEYED; - } /* tag for autokeying later */ ANIM_relative_keyingset_add_source(&dsources, &ob_iter->id, &RNA_PoseBone, pchan); @@ -1212,12 +1205,6 @@ static int pose_clear_transform_generic_exec(bContext *C, clear_func(ob_iter->pose, pchan_eval); #endif } - else { - /* add unkeyed tags */ - if (pchan->bone) { - pchan->bone->flag |= BONE_UNKEYED; - } - } } FOREACH_PCHAN_SELECTED_IN_OBJECT_END; diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index c75e9c9ef69..75348c2b196 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -313,11 +313,6 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks, /* Add data-source override for the PoseChannel, to be used later. */ ANIM_relative_keyingset_add_source(&dsources, &pfl->ob->id, &RNA_PoseBone, pchan); - - /* clear any unkeyed tags */ - if (pchan->bone) { - pchan->bone->flag &= ~BONE_UNKEYED; - } } /* insert keyframes for all relevant bones in one go */ diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index a4edf51ffee..7f24a0fa5f8 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -99,15 +99,7 @@ static void autokeyframe_pose( bPoseChannel *pchan; FCurve *fcu; - /* TODO: this should probably be done per channel instead. */ if (!autokeyframe_cfra_can_key(scene, id)) { - /* tag channels that should have unkeyed data */ - for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { - if (pchan->bone->flag & BONE_TRANSFORM) { - /* tag this channel */ - pchan->bone->flag |= BONE_UNKEYED; - } - } return; } @@ -139,9 +131,6 @@ static void autokeyframe_pose( ListBase dsources = {NULL, NULL}; - /* clear any 'unkeyed' flag it may have */ - pchan->bone->flag &= ~BONE_UNKEYED; - /* add datasource override for the camera object */ ANIM_relative_keyingset_add_source(&dsources, id, &RNA_PoseBone, pchan); |