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:
authorTon Roosendaal <ton@blender.org>2005-05-20 22:16:18 +0400
committerTon Roosendaal <ton@blender.org>2005-05-20 22:16:18 +0400
commitd99f64b82346da82f4f1a179c6f3b647f90d44ed (patch)
tree5ed006ed0cf16e021ba31c4c80e0e8750d656411 /source/blender/src/transform_manipulator.c
parentbc62536fac2f2ed378a64f62fc51183a89130ec4 (diff)
Manipulators now draw on location of optimal subsurf vertices. Looks
nicer, but be aware that these locations are 'virtual', derived from the actual Mesh Cage vertices you don't see. Normal transform (and actual transform with Manipulators) remains on the original vertices, which also shows with dashed line towards pivot on scale/rotate.
Diffstat (limited to 'source/blender/src/transform_manipulator.c')
-rw-r--r--source/blender/src/transform_manipulator.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c
index c33978b0b66..9bd62e1f801 100644
--- a/source/blender/src/transform_manipulator.c
+++ b/source/blender/src/transform_manipulator.c
@@ -59,6 +59,7 @@
#include "DNA_view3d_types.h"
#include "BKE_armature.h"
+#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
#include "BKE_lattice.h"
#include "BKE_object.h"
@@ -184,6 +185,8 @@ int calc_manipulator_stats(ScrArea *sa)
if((ob->lay & G.vd->lay)==0) return 0;
if(G.obedit->type==OB_MESH) {
+ int dmNeedsFree;
+ DerivedMesh *dm = mesh_get_cage_derived(G.obedit, &dmNeedsFree);
EditMesh *em = G.editMesh;
EditVert *eve;
float vec[3];
@@ -208,7 +211,8 @@ int calc_manipulator_stats(ScrArea *sa)
if(no_faces) VECADD(normal, normal, eve->no);
totsel++;
- calc_tw_center(eve->co);
+ dm->getMappedVertCoEM(dm, eve, vec);
+ calc_tw_center(vec);
}
}
/* the edge case... */
@@ -224,6 +228,9 @@ int calc_manipulator_stats(ScrArea *sa)
}
}
}
+ if (dmNeedsFree) {
+ dm->release(dm);
+ }
}
else if (G.obedit->type==OB_ARMATURE){
EditBone *ebo;