diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-09 12:12:36 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-09 12:12:36 +0400 |
commit | c192b80b179ee32c0d39417e0737ac5d409b0db9 (patch) | |
tree | f833d5df1ec5b007849661573de4a1da4d8c38f4 /source/blender/src/transform_manipulator.c | |
parent | 932e958816c8d64214cd08232dac65ace55df3d9 (diff) |
Big commit, had to rework lots of selection stuff so that things
worked properly with modifiers. Needs more testing I am sure.
No, honestly, I wasn't just cleaning for the hell of it, it
was *necessary* (I would never do such a thing). Selection should
work completely with cage options of modifiers now.
- added DerivedMesh foreach functions to iterate over mapped
verts/edges/face centers. These replaced some of the drawing
functions and are more general anyway. Special edge drawing
functions remain for performance reasons.
- removed EditFace xs, ys fields
- added general functions to iterate over screen coordinates of
mesh/curve/lattice objects
- removed all calc_*verts* functions that were used for storing
screen coordinates in objects. they were recalc'd on the fly
for most situations anyway, so now we just always do that.
calc_*verts_ext was one of those calls that did dirty things
deep down in the callstack (changing curarea and poking at
matrices)
- rewrote all vertex level selection routines (circle, lasso, bbox)
and closest vertex routines (rightmouse select) to use the new
system. This cleaned up the selection code a lot and the structure
of selection is much easier to see now. This is good for future
work on allowing modifiers to completely override the selection
system. It also points out some discrepancies in the way selection
is handled that might be nice to resolve (mesh vertex selection has
fancy stuff to try to help with selecting overlapping, but it only
works w/o bbuf select, and curves/lattices don't have at all).
- had to remove ton's code to move Manipulator to cage location, this
is not reliable (can come up with a different method if requested)
- as it happens BezTriple.s and BPoint.s are basically available to
be removed, just need to rewrite editipo code that still does
background calc of screen coordinates
- MVert.{xs,ys} are still around because they are abused in some places
for other info (not sure if this is safe actually, since they are
short's and the mvert limit went up).
And did I mention this commit is comes out to -305 lines? Well it does.
Diffstat (limited to 'source/blender/src/transform_manipulator.c')
-rw-r--r-- | source/blender/src/transform_manipulator.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c index 55dd981c576..c71abf15134 100644 --- a/source/blender/src/transform_manipulator.c +++ b/source/blender/src/transform_manipulator.c @@ -60,7 +60,6 @@ #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" @@ -175,8 +174,6 @@ 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 = editmesh_get_derived_cage(&dmNeedsFree); EditMesh *em = G.editMesh; EditVert *eve; float vec[3]; @@ -201,8 +198,7 @@ int calc_manipulator_stats(ScrArea *sa) if(no_faces) VECADD(normal, normal, eve->no); totsel++; - dm->getMappedVertCoEM(dm, eve, vec); - calc_tw_center(vec); + calc_tw_center(eve->co); } } /* the edge case... */ @@ -218,9 +214,6 @@ int calc_manipulator_stats(ScrArea *sa) } } } - if (dmNeedsFree) { - dm->release(dm); - } } else if (G.obedit->type==OB_ARMATURE){ EditBone *ebo; |