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-08 12:16:43 +0400
committerTon Roosendaal <ton@blender.org>2005-05-08 12:16:43 +0400
commit74ec3d4f51909bc998cce63a300b5488e97c3f5e (patch)
treec63379c610a510b1c342da2d5a12b70767853f89 /source/blender/src/transform_manipulator.c
parentd10862a9daecc05c6468bd6ebaed8194d3b4419e (diff)
Added: new Pivot option, "Around active object".
Works nice quick to rotate a group of Objects around a defined center, without hassle with the 3d cursor. Especially for the 3D Manipulator. In EditMode/PoseMode this option falls back to "Centroid", as does the "Individual centers" option already.
Diffstat (limited to 'source/blender/src/transform_manipulator.c')
-rw-r--r--source/blender/src/transform_manipulator.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c
index a102302d5c5..4fe2850b66c 100644
--- a/source/blender/src/transform_manipulator.c
+++ b/source/blender/src/transform_manipulator.c
@@ -1328,11 +1328,16 @@ void BIF_draw_manipulator(ScrArea *sa)
/* now we can define centre */
switch(v3d->around) {
case V3D_CENTRE:
- case V3D_LOCAL:
+ case V3D_ACTIVE:
v3d->twmat[3][0]= (G.scene->twmin[0] + G.scene->twmax[0])/2.0f;
v3d->twmat[3][1]= (G.scene->twmin[1] + G.scene->twmax[1])/2.0f;
v3d->twmat[3][2]= (G.scene->twmin[2] + G.scene->twmax[2])/2.0f;
+ if(v3d->around==V3D_ACTIVE && G.obedit==NULL && G.obpose==NULL) {
+ Object *ob= OBACT;
+ if(ob) VECCOPY(v3d->twmat[3], ob->obmat[3]);
+ }
break;
+ case V3D_LOCAL:
case V3D_CENTROID:
VECCOPY(v3d->twmat[3], G.scene->twcent);
break;