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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-21 01:02:12 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-21 01:02:12 +0400
commit2676f2d58f71f438008b413a86b873e7787d80ea (patch)
treeeb541972cf32d5958b7c0f7f8ece525b78cfcbff /source/blender/editors/transform/transform_manipulator.c
parentbb9976f058ba2090812074e1b774213d20821a30 (diff)
parent4ab1dadf72a821b344a714fff59aed11d15ecb14 (diff)
Merged changes in the trunk up to revision 42021.
Conflicts resolved: source/blender/blenkernel/intern/scene.c source/blender/blenloader/intern/readfile.c source/blender/editors/interface/resources.c source/blender/render/intern/source/pipeline.c
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 5b275a572cb..63495d54cf1 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -71,6 +71,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"
@@ -390,56 +391,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) {