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:
authorCampbell Barton <ideasman42@gmail.com>2013-09-15 15:51:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-15 15:51:38 +0400
commit810000f2be5077195087c62953fc7e5308f6384a (patch)
tree436abdf87ecb62818a819556dbb69ffdbe928625
parent8f3552953af30297d46d7867e2442e8158c98f6c (diff)
use crazy-space when modifiers_isCorrectableDeformed() fails,
without this. warp modifier for eg didnt use crazy-space.
-rw-r--r--source/blender/editors/transform/transform_conversions.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 51c46e78b55..22700f30561 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2218,25 +2218,26 @@ static void createTransEditVerts(TransInfo *t)
/* detect CrazySpace [tm] */
if (modifiers_getCageIndex(t->scene, t->obedit, NULL, 1) >= 0) {
+ int totleft = -1;
if (modifiers_isCorrectableDeformed(t->obedit)) {
- int totleft;
/* check if we can use deform matrices for modifier from the
* start up to stack, they are more accurate than quats */
totleft = editbmesh_get_first_deform_matrices(t->scene, t->obedit, em, &defmats, &defcos);
+ }
- /* if we still have more modifiers, also do crazyspace
- * correction with quats, relative to the coordinates after
- * the modifiers that support deform matrices (defcos) */
- if (totleft > 0) {
- mappedcos = crazyspace_get_mapped_editverts(t->scene, t->obedit);
- quats = MEM_mallocN(em->bm->totvert * sizeof(*quats), "crazy quats");
- crazyspace_set_quats_editmesh(em, defcos, mappedcos, quats);
- if (mappedcos)
- MEM_freeN(mappedcos);
- }
+ /* if we still have more modifiers, also do crazyspace
+ * correction with quats, relative to the coordinates after
+ * the modifiers that support deform matrices (defcos) */
+ if ((totleft > 0) || (totleft == -1)) {
+ mappedcos = crazyspace_get_mapped_editverts(t->scene, t->obedit);
+ quats = MEM_mallocN(em->bm->totvert * sizeof(*quats), "crazy quats");
+ crazyspace_set_quats_editmesh(em, defcos, mappedcos, quats);
+ if (mappedcos)
+ MEM_freeN(mappedcos);
+ }
- if (defcos)
- MEM_freeN(defcos);
+ if (defcos) {
+ MEM_freeN(defcos);
}
}