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>2011-11-16 07:10:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-16 07:10:15 +0400
commitc00c0134e0f40748885a6bbd5ef8b4ffb7c34f09 (patch)
treef649494ce560f248505225b3d29972a58b1e91b5 /source/blender/editors/transform/transform_manipulator.c
parente6e265b2b59e02cc7816a2ed43471eca8bca0a62 (diff)
parent9f46ca46a6fcdacf53d95a61147272352154204b (diff)
svn merge -r41847:41899 ^/trunk/blender
Diffstat (limited to 'source/blender/editors/transform/transform_manipulator.c')
-rw-r--r--source/blender/editors/transform/transform_manipulator.c91
1 files changed, 50 insertions, 41 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 70272c1cea0..07f56d484e7 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -72,6 +72,7 @@
#include "WM_types.h"
#include "ED_armature.h"
+#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_particle.h"
#include "ED_view3d.h"
@@ -382,56 +383,64 @@ int calc_manipulator_stats(const bContext *C)
}
else if ELEM(obedit->type, OB_CURVE, OB_SURF) {
Curve *cu= obedit->data;
- Nurb *nu;
- BezTriple *bezt;
- BPoint *bp;
- ListBase *nurbs= curve_editnurbs(cu);
-
- nu= nurbs->first;
- while(nu) {
- if(nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
- while(a--) {
- /* exceptions
- * if handles are hidden then only check the center points.
- * If the center knot is selected then only use this as the center point.
- */
- if (cu->drawflag & CU_HIDE_HANDLES) {
- if (bezt->f2 & SELECT) {
- calc_tw_center(scene, bezt->vec[1]);
- totsel++;
+ float center[3];
+
+ if (v3d->around==V3D_ACTIVE && ED_curve_actSelection(cu, center)) {
+ calc_tw_center(scene, center);
+ totsel++;
+ }
+ else {
+ Nurb *nu;
+ BezTriple *bezt;
+ BPoint *bp;
+ ListBase *nurbs= curve_editnurbs(cu);
+
+ nu= nurbs->first;
+ while(nu) {
+ if(nu->type == CU_BEZIER) {
+ bezt= nu->bezt;
+ a= nu->pntsu;
+ while(a--) {
+ /* exceptions
+ * if handles are hidden then only check the center points.
+ * If the center knot is selected then only use this as the center point.
+ */
+ if (cu->drawflag & CU_HIDE_HANDLES) {
+ if (bezt->f2 & SELECT) {
+ calc_tw_center(scene, bezt->vec[1]);
+ totsel++;
+ }
}
- }
- else if (bezt->f2 & SELECT) {
- calc_tw_center(scene, bezt->vec[1]);
- totsel++;
- }
- else {
- if(bezt->f1) {
- calc_tw_center(scene, bezt->vec[0]);
+ else if (bezt->f2 & SELECT) {
+ calc_tw_center(scene, bezt->vec[1]);
totsel++;
}
- if(bezt->f3) {
- calc_tw_center(scene, bezt->vec[2]);
- totsel++;
+ else {
+ if(bezt->f1) {
+ calc_tw_center(scene, bezt->vec[0]);
+ totsel++;
+ }
+ if(bezt->f3) {
+ calc_tw_center(scene, bezt->vec[2]);
+ totsel++;
+ }
}
+ bezt++;
}
- bezt++;
}
- }
- else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) {
- calc_tw_center(scene, bp->vec);
- totsel++;
+ else {
+ bp= nu->bp;
+ a= nu->pntsu*nu->pntsv;
+ while(a--) {
+ if(bp->f1 & SELECT) {
+ calc_tw_center(scene, bp->vec);
+ totsel++;
+ }
+ bp++;
}
- bp++;
}
+ nu= nu->next;
}
- nu= nu->next;
}
}
else if(obedit->type==OB_MBALL) {