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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-06 13:13:01 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-06 13:22:09 +0300
commitf1c8c25a3edfbb03795250965ece9d39fef58356 (patch)
treeae04bad082c3939783725482c5c0922ebf42068c /release/scripts/templates_py
parent32ef77bf0a995db447ad92d4a01e7ed5afcb5349 (diff)
UI: rename Translate/Grab to Move in UI, shortcuts stay the same.
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r--release/scripts/templates_py/gizmo_operator.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/release/scripts/templates_py/gizmo_operator.py b/release/scripts/templates_py/gizmo_operator.py
index bdc1bc9893c..d1eef09685d 100644
--- a/release/scripts/templates_py/gizmo_operator.py
+++ b/release/scripts/templates_py/gizmo_operator.py
@@ -114,20 +114,20 @@ class SelectSideOfPlaneGizmoGroup(GizmoGroup):
from mathutils import Matrix, Vector
# ----
- # Grab
+ # Move
- def grab_get_cb():
+ def move_get_cb():
op = SelectSideOfPlaneGizmoGroup.my_target_operator(context)
return op.plane_co
- def grab_set_cb(value):
+ def move_set_cb(value):
op = SelectSideOfPlaneGizmoGroup.my_target_operator(context)
op.plane_co = value
# XXX, this may change!
op.execute(context)
- mpr = self.gizmos.new("GIZMO_GT_grab_3d")
- mpr.target_set_handler("offset", get=grab_get_cb, set=grab_set_cb)
+ mpr = self.gizmos.new("GIZMO_GT_move_3d")
+ mpr.target_set_handler("offset", get=move_get_cb, set=move_set_cb)
mpr.use_draw_value = True
@@ -139,7 +139,7 @@ class SelectSideOfPlaneGizmoGroup(GizmoGroup):
mpr.scale_basis = 0.2
- self.widget_grab = mpr
+ self.widget_move = mpr
# ----
# Dial
@@ -189,12 +189,12 @@ class SelectSideOfPlaneGizmoGroup(GizmoGroup):
co = Vector(op.plane_co)
no = Vector(op.plane_no).normalized()
- # Grab
+ # Move
no_z = no
no_y = no_z.orthogonal()
no_x = no_z.cross(no_y)
- matrix = self.widget_grab.matrix_basis
+ matrix = self.widget_move.matrix_basis
matrix.identity()
matrix.col[0].xyz = no_x
matrix.col[1].xyz = no_y