利用者:Simtron/Doc:2.6/Manual/3D interaction/Transformations/Basics/Scale

提供: wiki
移動先: 案内検索


Page status (reviewing guidelines)

Partial page Text no link to Transform Control
Proposed fixes: none

Scale

Mode: Object and Edit modes

Hotkey: S

Menu: context dependent

Description

Pressing S will enter the “scale” transformation mode where the selected object or data is scaled inward or outward according to the mouse pointer’s location. The object/data’s scale will increase as the mouse pointer is moved away from the pivot point, and decrease as the pointer is moved towards it. If the mouse pointer crosses from the original side of the pivot point to the opposite side, the scale will continue in the negative direction, making the object/data appear flipped. The precision of the scaling is determined by the distance from the mouse pointer to the object/data when the scaling begins.

Scale option can be used in 3D view window, UV editor and Graph editor. The behavior of the scale transformation's keyboard shortcut is universal inside blender. That is you can expect similar action when you use scale option in any of the windows.

3D View

There are 2 types of scale options in the 3D View:

  • Using the Transform Widget helper, when you choose the scale Widget in the header of the 3DView.
  • Using shortcuts and combinations of shortcuts.

Scale Widget

Scale widget

In Blender, this is the scale Widget which is not active by default and must be activated from the transformation widget selection menu in the 3D window's header. You can access this option by click holding LMB and dragging one of the axis/box ends.

Keybord Shortcuts

LMB Template-LMB.png
Confirm the scale, and leave the object or data at its current scale on the screen.
MMB Template-MMB.png
Constrain the scaling to the X, Y or Z axis.
RMB Template-RMB.png or Esc
Cancel the scale, and return the object or data to its original scale.
S+x/y/z
Enables isolated axis scaling. The axis about which the scaling has to be done is specified by the x/y/z choice.
S+shift+x/y/z
Enables complementary isolated axis scaling. The axis specified in this option will not be scaled while the rest will be scaled.
Ctrl
Enables snapping. This option lets scaling of object constrained to the snap settings.
⇧ Shift
Enables precise scaling. The rate of scale transformation will be reduced to smaller steps to enable more control over the scale transformation.
<decimal number>
You can specify the exact amount by which the transformation is to be done by entering a numerical value after entering into the scale mode by hitting S key. This option works along with the axis isolation method also. The value entered will be displayed at the bottom left of the 3D view window.




Orientations

There are 5 orientations for all tranformations.

Orientation choice menu
» Global(default)
» Local
» Normal
» Gimbal
» View

Each mode is a co-ordinate system in which the transformations can be carried out. One can look up for more about these orientations on wikipedia. These orientations can be choosen from the pop up menu just by the side of transformation manipulator choice widget group.

R+xx/yy/zz
Isolated axis scaling about the Local axis can be achieved by pressing Xx/Yy/Zz keys after pressing the s key. Ofcourse this can be followed by a numerical specification of scaling.
Similar to above operation, S key followed by ⇧ Shift and Xx or Yy or Zz will directly allow you to rotate the objects in local axes complementary to the one specified.

Python Scripting

Data Access

Like every other option in blender, scale operation can also be scripted. Every 3D object created will have a property or variable called scale in it which can be set to a 3D vector value to attain the equivalent scaling operation. It can be done in this way.

>>>c=bpy.data.objects["Cube"] # Your Cube object in default scene
>>>c.scale
vector((1.0,1.0,1.0)) #Default value of the scale variable
>>>c.scale=((2,1,1)) #Scaling the object about local x axis by default
Operator
bpy.ops.transform.resize(value=(<float>, <float>, <float>), constraint_axis=(<bool>, <bool>,<bool>), constraint_orientation='<orientation>', mirror=<bool>, proportional='ENABLED/DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, snap=<bool>, snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=<bool>, snap_normal=(0, 0, 0), texture_space=<bool>, release_confirm=<bool>)

More details of this operator can be found in the python api documentation of blender under the operators section.