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:
authorJoshua Leung <aligorith@gmail.com>2012-08-30 16:59:46 +0400
committerJoshua Leung <aligorith@gmail.com>2012-08-30 16:59:46 +0400
commit5eba8634290356749392e1cf1e084e64a3a8e015 (patch)
tree0a94593925a951ff83a2706c4c8fced48f7ea7ac /source/blender
parentded5e9cd2324eaa28b85d17d0f8d394f72625c8a (diff)
Bugfix [#32440] Segmentation fault when moving bone in pose mode when Ghost
Around Frame is enabled It turns out that the final "rebuild pose" at the end of each ghost drawing step was at fault here, as it resulted in bones referring to a different set of constraints after each ghost drawing step. However, most of the time, these new references pointed to non-existent locations, causing the segfaults. To fix this, I've removed this last rebuild step, which seems to work fine (no major problems seem to arise from this). Also, to ensure that the other object parameters have not changed (as a result of the reevaluation that needs to go on), we now evaluate the object once more after all the ghost drawing (but before final restore) so that object parameters (and potentially sub-data) are all restored to their original values. An upside of removing the final rebuild step is that "In Range" and "On Keyframe" ghosting options now work with proxies again. Previously, trying to move bones (but without autokey enabled) would mean that bones would snap back to their unkeyed positions.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index a05bc5eddc7..4472ff280e9 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -2378,7 +2378,11 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
-
+
+ /* before disposing of temp pose, use it to restore object to a sane state */
+ BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)cfrao, ADT_RECALC_ALL);
+
+ /* clean up temporary pose */
ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */
BKE_pose_free(posen);
@@ -2386,7 +2390,6 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base
CFRA = cfrao;
ob->pose = poseo;
arm->flag = flago;
- BKE_pose_rebuild(ob, ob->data);
ob->mode |= OB_MODE_POSE;
ob->ipoflag = ipoflago;
}
@@ -2457,7 +2460,11 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
-
+
+ /* before disposing of temp pose, use it to restore object to a sane state */
+ BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)cfrao, ADT_RECALC_ALL);
+
+ /* clean up temporary pose */
ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */
BLI_dlrbTree_free(&keys);
BKE_pose_free(posen);
@@ -2466,7 +2473,6 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *
CFRA = cfrao;
ob->pose = poseo;
arm->flag = flago;
- BKE_pose_rebuild(ob, ob->data);
ob->mode |= OB_MODE_POSE;
}
@@ -2544,7 +2550,11 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
}
glDisable(GL_BLEND);
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
-
+
+ /* before disposing of temp pose, use it to restore object to a sane state */
+ BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)cfrao, ADT_RECALC_ALL);
+
+ /* clean up temporary pose */
ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */
BKE_pose_free(posen);
@@ -2552,7 +2562,6 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
CFRA = cfrao;
ob->pose = poseo;
arm->flag = flago;
- BKE_pose_rebuild(ob, ob->data);
ob->mode |= OB_MODE_POSE;
}