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:
authorMartin Poirier <theeth@yahoo.com>2005-06-17 08:28:01 +0400
committerMartin Poirier <theeth@yahoo.com>2005-06-17 08:28:01 +0400
commite382d8ad4a97183700165d3b0b66a0e94814a34a (patch)
tree08e6daa45e476868e4b01fd6c76be7cd61deabf2 /source/blender/src/transform_manipulator.c
parent5fac7965c26915f4ab90559bdd756dc204a70b46 (diff)
Adding Jiri's manipulator path. This makes Normal orientation align to meta element's rotation (in edit mode, obviously).
Diffstat (limited to 'source/blender/src/transform_manipulator.c')
-rw-r--r--source/blender/src/transform_manipulator.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c
index 69822e2868e..c09724a7284 100644
--- a/source/blender/src/transform_manipulator.c
+++ b/source/blender/src/transform_manipulator.c
@@ -293,16 +293,34 @@ int calc_manipulator_stats(ScrArea *sa)
else if(G.obedit->type==OB_MBALL) {
/* editmball.c */
extern ListBase editelems; /* go away ! */
- MetaElem *ml;
+ MetaElem *ml, *ml_sel=NULL;
ml= editelems.first;
while(ml) {
if(ml->flag & SELECT) {
calc_tw_center(&ml->x);
+ ml_sel = ml;
totsel++;
}
ml= ml->next;
}
+ /* normal manipulator */
+ if(totsel==1){
+ float mat1[4][4];
+
+ /* Rotation of MetaElem is stored in quat */
+ QuatToMat4(ml_sel->quat, mat1);
+
+ /* Translation of MetaElem */
+ mat1[3][0]= ml_sel->x;
+ mat1[3][1]= ml_sel->y;
+ mat1[3][2]= ml_sel->z;
+
+ VECCOPY(normal, mat1[2]);
+ VECCOPY(plane, mat1[1]);
+
+ VecMulf(plane, -1.0);
+ }
}
else if(G.obedit->type==OB_LATTICE) {
BPoint *bp;