[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50272] trunk/blender/source/blender/ editors/space_view3d/drawarmature.c: Bugfix [#32440] Segmentation fault when moving bone in pose mode when Ghost
Julien Duroure
julien.duroure at gmail.com
Thu Aug 30 19:04:05 CEST 2012
Hello,
This commit doesn’t correct the problem. Tested with files on attachment of
bug tracker [1]
Regards,
Julien
[1] :
http://projects.blender.org/tracker/?func=detail&atid=498&aid=32440&group_id=9
On Thu, Aug 30, 2012 at 2:59 PM, Joshua Leung <aligorith at gmail.com> wrote:
> Revision: 50272
>
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50272
> Author: aligorith
> Date: 2012-08-30 12:59:46 +0000 (Thu, 30 Aug 2012)
> Log Message:
> -----------
> 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.
>
> Modified Paths:
> --------------
> trunk/blender/source/blender/editors/space_view3d/drawarmature.c
>
> Modified: trunk/blender/source/blender/editors/space_view3d/drawarmature.c
> ===================================================================
> --- trunk/blender/source/blender/editors/space_view3d/drawarmature.c
> 2012-08-30 06:31:02 UTC (rev 50271)
> +++ trunk/blender/source/blender/editors/space_view3d/drawarmature.c
> 2012-08-30 12:59:46 UTC (rev 50272)
> @@ -2378,7 +2378,11 @@
> }
> 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 @@
> 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 @@
> }
> 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 @@
> CFRA = cfrao;
> ob->pose = poseo;
> arm->flag = flago;
> - BKE_pose_rebuild(ob, ob->data);
> ob->mode |= OB_MODE_POSE;
> }
>
> @@ -2544,7 +2550,11 @@
> }
> 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 @@
> CFRA = cfrao;
> ob->pose = poseo;
> arm->flag = flago;
> - BKE_pose_rebuild(ob, ob->data);
> ob->mode |= OB_MODE_POSE;
> }
>
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>
More information about the Bf-committers
mailing list