Last minute patch from Chris Want
authorTon Roosendaal <ton@blender.org>
Mon, 12 Jun 2006 20:01:18 +0000 (20:01 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 12 Jun 2006 20:01:18 +0000 (20:01 +0000)
Nkey "Properties Panel" now has Dimension ("Dim") buttons too.
This reads from the actual bounding box value to see the size. Note that
dimensions for animated & deformed objects will change per frame.

(Cleaned up buttons layout for patch, and added support for Curve, Text and
Surface objects)

source/blender/include/butspace.h
source/blender/makesdna/DNA_object_types.h
source/blender/python/api2_2x/Object.c
source/blender/src/drawview.c
source/blender/src/editobject.c
source/blender/src/header_view3d.c
source/blender/src/space.c
source/blender/src/toolbox.c
source/blender/src/transform.c
source/blender/src/transform_manipulator.c

index d0961f804e3ad01fbb94cf7a9c26c30e7dc177d3..010313f91a4dae884acf33729d684fce5d809ef4 100644 (file)
@@ -163,6 +163,8 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la
 #define B_OBJECTPANELPARENT    1011
 #define B_OBJECTPANEL          1012
 #define B_ARMATUREPANEL3       1013
+#define B_OBJECTPANELSCALE     1014
+#define B_OBJECTPANELDIMS      1015
 
 /* *********************** */
 #define B_LAMPBUTS             1200
index 170c5d5b7cbef54a69144515d767101fcb640584..782b7fdd6cb66a08787d16e649e84c6c979894f5 100644 (file)
@@ -401,9 +401,9 @@ extern Object workob;
 #define OB_LOCK_ROTX   8
 #define OB_LOCK_ROTY   16
 #define OB_LOCK_ROTZ   32
-#define OB_LOCK_SIZEX  64
-#define OB_LOCK_SIZEY  128
-#define OB_LOCK_SIZEZ  256
+#define OB_LOCK_SCALEX 64
+#define OB_LOCK_SCALEY 128
+#define OB_LOCK_SCALEZ 256
 
 /* ob->softflag in DNA_object_force.h */
 
index fd9da41f2ce74bd1f777972009ef44285bbc81c2..20a2dd6828136026d53f1f525fa87cede92907b3 100644 (file)
@@ -3878,7 +3878,7 @@ static int Object_setAttr( BPy_Object * obj, char *name, PyObject * value )
 
                flag &= OB_LOCK_LOCX | OB_LOCK_LOCY | OB_LOCK_LOCZ |
                        OB_LOCK_ROTX | OB_LOCK_ROTY | OB_LOCK_ROTZ |
-                       OB_LOCK_SIZEX | OB_LOCK_SIZEY | OB_LOCK_SIZEZ;
+                       OB_LOCK_SCALEX | OB_LOCK_SCALEY | OB_LOCK_SCALEZ;
 
                object->protectflag = (short)flag;
                return 0;
index a4e2619de74003b8510551393dce8c764e39106a..0c42676a05f74bb962badc0ec7eb7bd1e2710ae5 100644 (file)
@@ -90,6 +90,7 @@
 #include "BKE_ipo.h"
 #include "BKE_key.h"
 #include "BKE_main.h"
+#include "BKE_mesh.h"
 #include "BKE_object.h"
 #include "BKE_scene.h"
 #include "BKE_texture.h"
@@ -1493,6 +1494,10 @@ static void load_bgpic_image(char *name)
 
 /* this one assumes there is only one global active object in blender...  (for object panel) */
 static float ob_eul[4];        // used for quat too....
+static float ob_scale[3]; // need temp space due to linked values
+static float ob_dims[3];
+static short link_scale = 0;
+
 /* this one assumes there is only one editmode in blender...  (for object panel) */
 static float ve_median[5];
 
@@ -1859,11 +1864,11 @@ static void v3d_posearmature_buts(uiBlock *block, Object *ob, float lim)
        uiDefButF(block, NUM, B_ARMATUREPANEL3, "RotZ:",        30, 30, 120, 19, ob_eul+2, -1000.0, 1000.0, 100, 3, "");
        
        uiBlockBeginAlign(block);
-       uiDefIconButBitS(block, ICONTOG, OB_LOCK_SIZEX, REDRAWVIEW3D, ICON_UNLOCKED,    160,70,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+       uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, REDRAWVIEW3D, ICON_UNLOCKED,   160,70,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
        uiDefButF(block, NUM, B_ARMATUREPANEL2, "SizeX:",       180, 70, 120, 19, pchan->size, -lim, lim, 10, 3, "");
-       uiDefIconButBitS(block, ICONTOG, OB_LOCK_SIZEY, REDRAWVIEW3D, ICON_UNLOCKED,    160,50,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+       uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, REDRAWVIEW3D, ICON_UNLOCKED,   160,50,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
        uiDefButF(block, NUM, B_ARMATUREPANEL2, "SizeY:",       180, 50, 120, 19, pchan->size+1, -lim, lim, 10, 3, "");
-       uiDefIconButBitS(block, ICONTOG, OB_LOCK_SIZEZ, REDRAWVIEW3D, ICON_UNLOCKED,    160,30,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+       uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, REDRAWVIEW3D, ICON_UNLOCKED,   160,30,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
        uiDefButF(block, NUM, B_ARMATUREPANEL2, "SizeZ:",       180, 30, 120, 19, pchan->size+2, -lim, lim, 10, 3, "");
        uiBlockEndAlign(block);
 }
@@ -2008,6 +2013,97 @@ void do_viewbuts(unsigned short event)
                        allqueue(REDRAWVIEW3D, 1);
                }
                break;
+
+       case B_OBJECTPANELSCALE:
+               if(ob) {
+                       float ratio, tmp, max = 0.0;
+                       int axis;
+
+                       /* figure out which axis changed */
+                       axis = 0;
+                       max = fabs(ob_scale[0] - ob->size[0]);
+                       tmp = fabs(ob_scale[1] - ob->size[1]);
+                       if (tmp > max) {
+                               axis = 1;
+                               max = tmp;
+                       }
+                       tmp = fabs(ob_scale[2] - ob->size[2]);
+                       if (tmp > max) {
+                               axis = 2;
+                               max = tmp;
+                       }
+               
+                       if (ob->size[axis] != ob_scale[axis]) {
+                               if (link_scale) {
+                                       if (ob->size[axis] > 0.0) {
+                                               ratio = ob_scale[axis] / ob->size[axis];
+                                               ob->size[0] *= ratio;
+                                               ob->size[1] *= ratio;
+                                               ob->size[2] *= ratio;
+                                       }
+                               }
+                               ob->size[axis] = ob_scale[axis];
+
+                               DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+                               allqueue(REDRAWVIEW3D, 1);
+                       }
+               }
+               break;
+
+       case B_OBJECTPANELDIMS:
+               if(ob && (ob->type==OB_MESH)) {
+                       BoundBox *bb;
+                       float old_dims[3], scale[3], ratio, len[3], tmp, max = 0.0;
+                       
+                       int axis;
+
+                       bb    = mesh_get_bb(ob->data);
+                       Mat4ToSize(ob->obmat, scale);
+
+                       len[0] = bb->vec[4][0] - bb->vec[0][0];
+                       len[1] = bb->vec[2][1] - bb->vec[0][1];
+                       len[2] = bb->vec[1][2] - bb->vec[0][2];
+
+                       old_dims[0] = fabs(scale[0]) * len[0];
+                       old_dims[1] = fabs(scale[1]) * len[1];
+                       old_dims[2] = fabs(scale[2]) * len[2];
+
+                       /* figure out which axis changed */
+                       axis = 0;
+                       max = fabs(ob_dims[0] - old_dims[0]);
+                       tmp = fabs(ob_dims[1] - old_dims[1]);
+                       if (tmp > max) {
+                               axis = 1;
+                               max = tmp;
+                       }
+                       tmp = fabs(ob_dims[2] - old_dims[2]);
+                       if (tmp > max) {
+                               axis = 2;
+                               max = tmp;
+                       }
+
+                       if (old_dims[axis] != ob_dims[axis]) {
+                               if (old_dims[axis] > 0.0) {
+                                       ratio = ob_dims[axis] / old_dims[axis]; 
+                                       if (link_scale) {
+                                               ob->size[0] *= ratio;
+                                               ob->size[1] *= ratio;
+                                               ob->size[2] *= ratio;
+                                       }
+                                       else {
+                                               ob->size[axis] *= ratio;
+                                       }
+                               }
+                               else {
+                                       if (len[axis] > 0) {
+                                               ob->size[axis] = ob_dims[axis] / len[axis];
+                                       }
+                               }
+                               DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+                               allqueue(REDRAWVIEW3D, 1);
+                       }
+               }
+               break;
        
        case B_OBJECTPANELMEDIAN:
                if(ob) {
@@ -2156,34 +2252,65 @@ static void view3d_panel_object(short cntrl)    // VIEW3D_HANDLER_OBJECT
                uiBlockPickerButtons(block, &Gvp.r, hsv, old, hexcol, 'f', REDRAWBUTSEDIT);     /* 'f' is for floating panel */
        }
        else {
+               BoundBox *bb = NULL;
+
                uiBlockBeginAlign(block);
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, REDRAWVIEW3D, ICON_UNLOCKED,     10,140,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANEL, "LocX:",           30, 140, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, "");
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, REDRAWVIEW3D, ICON_UNLOCKED,     10,120,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANEL, "LocY:",           30, 120, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, "");
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, REDRAWVIEW3D, ICON_UNLOCKED,     10,100,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANEL, "LocZ:",           30, 100, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, REDRAWVIEW3D, ICON_UNLOCKED,     10,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANEL, "LocX:",           30, 150, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, REDRAWVIEW3D, ICON_UNLOCKED,     10,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANEL, "LocY:",           30, 130, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, REDRAWVIEW3D, ICON_UNLOCKED,     10,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANEL, "LocZ:",           30, 110, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, "");
                
                ob_eul[0]= 180.0*ob->rot[0]/M_PI;
                ob_eul[1]= 180.0*ob->rot[1]/M_PI;
                ob_eul[2]= 180.0*ob->rot[2]/M_PI;
                
                uiBlockBeginAlign(block);
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, REDRAWVIEW3D, ICON_UNLOCKED,     10,70,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANELROT, "RotX:",        30, 70, 120, 19, &(ob_eul[0]), -lim, lim, 1000, 3, "");
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, REDRAWVIEW3D, ICON_UNLOCKED,     10,50,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANELROT, "RotY:",        30, 50, 120, 19, &(ob_eul[1]), -lim, lim, 1000, 3, "");
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, REDRAWVIEW3D, ICON_UNLOCKED,     10,30,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANELROT, "RotZ:",        30, 30, 120, 19, &(ob_eul[2]), -lim, lim, 1000, 3, "");
-               
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, REDRAWVIEW3D, ICON_UNLOCKED,     160,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANELROT, "RotX:",        180, 150, 120, 19, &(ob_eul[0]), -lim, lim, 1000, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, REDRAWVIEW3D, ICON_UNLOCKED,     160,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANELROT, "RotY:",        180, 130, 120, 19, &(ob_eul[1]), -lim, lim, 1000, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, REDRAWVIEW3D, ICON_UNLOCKED,     160,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANELROT, "RotZ:",        180, 110, 120, 19, &(ob_eul[2]), -lim, lim, 1000, 3, "");
+
+               ob_scale[0]= ob->size[0];
+               ob_scale[1]= ob->size[1];
+               ob_scale[2]= ob->size[2];
+
                uiBlockBeginAlign(block);
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_SIZEX, REDRAWVIEW3D, ICON_UNLOCKED,    160,70,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANEL, "SizeX:",          180, 70, 120, 19, &(ob->size[0]), -lim, lim, 10, 3, "");
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_SIZEY, REDRAWVIEW3D, ICON_UNLOCKED,    160,50,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANEL, "SizeY:",          180, 50, 120, 19, &(ob->size[1]), -lim, lim, 10, 3, "");
-               uiDefIconButBitS(block, ICONTOG, OB_LOCK_SIZEZ, REDRAWVIEW3D, ICON_UNLOCKED,    160,30,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
-               uiDefButF(block, NUM, B_OBJECTPANEL, "SizeZ:",          180, 30, 120, 19, &(ob->size[2]), -lim, lim, 10, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, REDRAWVIEW3D, ICON_UNLOCKED,   10,80,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANELSCALE, "ScaleX:",            30, 80, 120, 19, &(ob_scale[0]), -lim, lim, 10, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, REDRAWVIEW3D, ICON_UNLOCKED,   10,60,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANELSCALE, "ScaleY:",            30, 60, 120, 19, &(ob_scale[1]), -lim, lim, 10, 3, "");
+               uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, REDRAWVIEW3D, ICON_UNLOCKED,   10,40,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
+               uiDefButF(block, NUM, B_OBJECTPANELSCALE, "ScaleZ:",            30, 40, 120, 19, &(ob_scale[2]), -lim, lim, 10, 3, "");
                uiBlockEndAlign(block);
+               
+               uiDefButS(block, TOG, REDRAWVIEW3D, "Link Scale",               10, 10, 140, 19, &(link_scale), 0, 1, 0, 0, "Size values vary proportionally in all directions");
+
+               if(ob->type==OB_MESH)
+                       bb = mesh_get_bb(ob->data);
+               else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)
+                       bb= ( (Curve *)ob->data )->bb;
+               
+               if (bb) {
+                       float scale[3];
+
+                       bb = mesh_get_bb(ob->data);
+                       Mat4ToSize(ob->obmat, scale);
+
+                       ob_dims[0] = fabs(scale[0]) * (bb->vec[4][0] - bb->vec[0][0]);
+                       ob_dims[1] = fabs(scale[1]) * (bb->vec[2][1] - bb->vec[0][1]);
+                       ob_dims[2] = fabs(scale[2]) * (bb->vec[1][2] - bb->vec[0][2]);
+
+                       uiBlockBeginAlign(block);
+                       uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimX:",               160, 80, 140, 19, &(ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size");
+                       uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimY:",               160, 60, 140, 19, &(ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size");
+                       uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimZ:",               160, 40, 140, 19, &(ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size");
+
+                       uiBlockEndAlign(block);
+               }
        }
        uiClearButLock();
 }
index 65a54ef17bb41062c4601bd1f9bad49d1ca1d662..44d2447c3546b91808ff3593424955179653f999 100644 (file)
@@ -941,7 +941,7 @@ void clear_object(char mode)
        
        if(mode=='r') str= "Clear rotation";
        else if(mode=='g') str= "Clear location";
-       else if(mode=='s') str= "Clear size";
+       else if(mode=='s') str= "Clear scale";
        else if(mode=='o') str= "Clear origin";
        else return;
        
@@ -3331,7 +3331,7 @@ void apply_object()
                return;
        }
 
-       if(okee("Apply size and rotation")==0) return;
+       if(okee("Apply scale and rotation")==0) return;
 
        base= FIRSTBASE;
        while(base) {
index fa38f0fbd7700c6cace049495efb9667cf176590..de87b587e35d04ee557c1d6100a929ab55d60e2f 100644 (file)
@@ -1646,7 +1646,7 @@ static void do_view3d_edit_object_transformmenu(void *arg, int event)
        case 0: /*      clear origin */
                clear_object('o');
                break;
-       case 1: /* clear size */
+       case 1: /* clear scale */
                clear_object('s');
                break;
        case 2: /* clear rotation */
@@ -1661,7 +1661,7 @@ static void do_view3d_edit_object_transformmenu(void *arg, int event)
        case 5: /* make duplis real */
                make_duplilist_real();
                break;
-       case 6: /* apply size/rotation or deformation */
+       case 6: /* apply scale/rotation or deformation */
                apply_object();
                break;  
        }
@@ -1676,7 +1676,7 @@ static uiBlock *view3d_edit_object_transformmenu(void *arg_unused)
        block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_transformmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
        uiBlockSetButmFunc(block, do_view3d_edit_object_transformmenu, NULL);
        
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Size/Rotation|Ctrl A",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Scale/Rotation|Ctrl A",                    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Deformation|Ctrl Shift A",         0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Duplicates Real|Ctrl Shift A",              0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
        
@@ -1684,7 +1684,7 @@ static uiBlock *view3d_edit_object_transformmenu(void *arg_unused)
        
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Location|Alt G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Rotation|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Size|Alt S",               0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Scale|Alt S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Origin|Alt O",             0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
        
        uiBlockSetDirection(block, UI_RIGHT);
@@ -3346,7 +3346,7 @@ static void do_view3d_pose_armature_transformmenu(void *arg, int event)
        case 0: /*      clear origin */
                clear_object('o');
                break;
-       case 1: /* clear size */
+       case 1: /* clear scale */
                clear_object('s');
                break;
        case 2: /* clear rotation */
@@ -3369,7 +3369,7 @@ static uiBlock *view3d_pose_armature_transformmenu(void *arg_unused)
        
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Location|Alt G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Rotation|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Size|Alt S",               0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Scale|Alt S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Origin|Alt O",             0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
        
        uiBlockSetDirection(block, UI_RIGHT);
index 871cb27f37e973c2a7acd48c85b846c6466dec9b..5fd746f63a1e5851a90af4e59162690c5267fab7 100644 (file)
@@ -1774,7 +1774,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                                }
                                        }
                                        
-                                       if(okee("Clear size")) {
+                                       if(okee("Clear scale")) {
                                                clear_object('s');
                                        }
                                }
index a665479524378150b87bbddac44a3f6fae2cd6c9..fb7b7ed030ab9031f5f834182eeca92e19681e10 100644 (file)
@@ -1175,10 +1175,10 @@ static void tb_do_transform_clearapply(void *arg, int event)
                case 1: /* clear rotation */
                        clear_object('r');
                        break;
-               case 2: /* clear size */
+               case 2: /* clear scale */
                        clear_object('s');
                        break;
-               case 3: /* apply size/rotation */
+               case 3: /* apply scale/rotation */
                        apply_object();
                        break;
                case 4: /* apply deformation */
@@ -1194,9 +1194,9 @@ static void tb_do_transform_clearapply(void *arg, int event)
 static TBitem tb_transform_clearapply[]= {
 {      0, "Clear Location|Alt G",              0, NULL},
 {      0, "Clear Rotation|Alt R",              1, NULL},
-{      0, "Clear Size|Alt S",                  2, NULL},
+{      0, "Clear Scale|Alt S",                 2, NULL},
 {      0, "SEPR",                                      0, NULL},
-{      0, "Apply Size/Rotation|Ctrl A", 3, NULL},
+{      0, "Apply Scale/Rotation|Ctrl A", 3, NULL},
 {      0, "Apply Deformation|Shift Ctrl A", 4, NULL},
 {      0, "Make Duplicates Real|Shift Ctrl A", 5, NULL},
 {  -1, "",                     0, tb_do_transform_clearapply}};
index 77dad5fb1e8c33530a47272ade4a46c14623013e..ad76cd332fd19f88fd4ffac0a273444d21c334d7 100755 (executable)
@@ -1051,11 +1051,11 @@ static void protectedTransBits(short protectflag, float *vec)
 
 static void protectedSizeBits(short protectflag, float *size)
 {
-       if(protectflag & OB_LOCK_SIZEX)
+       if(protectflag & OB_LOCK_SCALEX)
                size[0]= 1.0f;
-       if(protectflag & OB_LOCK_SIZEY)
+       if(protectflag & OB_LOCK_SCALEY)
                size[1]= 1.0f;
-       if(protectflag & OB_LOCK_SIZEZ)
+       if(protectflag & OB_LOCK_SCALEZ)
                size[2]= 1.0f;
 }
 
index 815579ed24e362092a29f7d16a7bc386126f581e..97a6ad227cc4c78dc6a346207ce23b570cb5ca3d 100644 (file)
@@ -148,11 +148,11 @@ static void protectflag_to_drawflags(short protectflag, short *drawflags)
        if(protectflag & OB_LOCK_ROTZ)
                *drawflags &= ~MAN_ROT_Z;
 
-       if(protectflag & OB_LOCK_SIZEX)
+       if(protectflag & OB_LOCK_SCALEX)
                *drawflags &= ~MAN_SCALE_X;
-       if(protectflag & OB_LOCK_SIZEY)
+       if(protectflag & OB_LOCK_SCALEY)
                *drawflags &= ~MAN_SCALE_Y;
-       if(protectflag & OB_LOCK_SIZEZ)
+       if(protectflag & OB_LOCK_SCALEZ)
                *drawflags &= ~MAN_SCALE_Z;
 }