[Bf-blender-cvs] [fc09d58] temp_motionpaths: Cleanup fcurve tags properly.
Antony Riakiotakis
noreply at git.blender.org
Fri Mar 13 16:47:57 CET 2015
Commit: fc09d58127333c69ed20805c3de7975058dc3cad
Author: Antony Riakiotakis
Date: Fri Mar 13 16:47:45 2015 +0100
Branches: temp_motionpaths
https://developer.blender.org/rBfc09d58127333c69ed20805c3de7975058dc3cad
Cleanup fcurve tags properly.
===================================================================
M source/blender/editors/transform/transform_conversions.c
===================================================================
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index bd1c655..3fbc4f2 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5217,6 +5217,8 @@ void autokeyframe_ob_tag_existing(Scene *scene, Object *ob) {
for (fcu = act->curves.first; fcu; fcu = fcu->next) {
bool replace;
binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &replace);
+
+ fcu->flag &= ~FCURVE_TAGGED;
if (replace) {
fcu->flag |= FCURVE_TAGGED;
}
@@ -5246,8 +5248,10 @@ void autokeyframe_ob_revert(bContext *C, Scene *scene, Object *ob) {
for (fcu = act->curves.first; fcu; fcu = fcu_next) {
fcu_next = fcu->next;
- if (fcu->flag & FCURVE_TAGGED)
+ if (fcu->flag & FCURVE_TAGGED) {
+ fcu->flag &= ~FCURVE_TAGGED;
insert_keyframe(reports, id, act, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
+ }
else
delete_keyframe(reports, id, act, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
}
@@ -5397,6 +5401,8 @@ void autokeyframe_pose_tag_existing(Scene *scene, Object *ob) {
if (pchanName && STREQ(pchanName, pchan->name)) {
bool replace;
binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &replace);
+
+ fcu->flag &= ~FCURVE_TAGGED;
if (replace) {
fcu->flag |= FCURVE_TAGGED;
}
@@ -5447,8 +5453,10 @@ void autokeyframe_pose_revert(bContext *C, Scene *scene, Object *ob, bool target
* NOTE: this will do constraints too, but those are ok to do here too?
*/
if (pchanName && STREQ(pchanName, pchan->name)) {
- if (fcu->flag & FCURVE_TAGGED)
+ if (fcu->flag & FCURVE_TAGGED) {
+ fcu->flag &= ~FCURVE_TAGGED;
insert_keyframe(reports, id, act, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
+ }
else
delete_keyframe(reports, id, act, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
}
More information about the Bf-blender-cvs
mailing list