Make `draw_armature()` abort in case pose is not up-to-date.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 19 Jul 2018 14:52:49 +0000 (16:52 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 20 Jul 2018 08:22:06 +0000 (10:22 +0200)
Previously it was calling `BKE_pose_rebuild()`, such thing shall never
be called from drawing code! Hopefully this now works as expected and
that horrible hack is not needed anymore.

source/blender/draw/intern/draw_armature.c

index 8b90d3285416c8198048fa425f5c7026aeefd9e7..f0a32dfc8e010c7f326d39604a1fbc03ce253530 100644 (file)
@@ -1623,7 +1623,7 @@ static void draw_armature_pose(Object *ob, const float const_color[4])
 
        /* We can't safely draw non-updated pose, might contain NULL bone pointers... */
        if (ob->pose->flag & POSE_RECALC) {
-               BKE_pose_rebuild(NULL, ob, arm);
+               return;
        }
 
        // if (!(base->flag & OB_FROMDUPLI)) // TODO