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>2006-06-13 00:01:18 +0400
committerTon Roosendaal <ton@blender.org>2006-06-13 00:01:18 +0400
commitb58998729bbc27dc978436596f81b4d1df899137 (patch)
tree6226d62110dfb7d42294f549df63d17a7b5eba07 /source/blender/src
parent98b8b876b61995af8f8e349ac39fae653f8a8af4 (diff)
Last minute patch from Chris Want
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)
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawview.c171
-rw-r--r--source/blender/src/editobject.c4
-rw-r--r--source/blender/src/header_view3d.c12
-rw-r--r--source/blender/src/space.c2
-rw-r--r--source/blender/src/toolbox.c8
-rwxr-xr-xsource/blender/src/transform.c6
-rw-r--r--source/blender/src/transform_manipulator.c6
7 files changed, 168 insertions, 41 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index a4e2619de74..0c42676a05f 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -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();
}
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 65a54ef17bb..44d2447c354 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -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) {
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c
index fa38f0fbd77..de87b587e35 100644
--- a/source/blender/src/header_view3d.c
+++ b/source/blender/src/header_view3d.c
@@ -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);
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index 871cb27f37e..5fd746f63a1 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -1774,7 +1774,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
}
}
- if(okee("Clear size")) {
+ if(okee("Clear scale")) {
clear_object('s');
}
}
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index a6654795243..fb7b7ed030a 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -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}};
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c
index 77dad5fb1e8..ad76cd332fd 100755
--- a/source/blender/src/transform.c
+++ b/source/blender/src/transform.c
@@ -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;
}
diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c
index 815579ed24e..97a6ad227cc 100644
--- a/source/blender/src/transform_manipulator.c
+++ b/source/blender/src/transform_manipulator.c
@@ -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;
}