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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-10 21:16:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-10 21:31:10 +0300
commit3f3326af1ce079b1526c407dbc11dd12c4a1bb79 (patch)
tree9eb757f64ac563aa2c645ce89f54177bca30362d /release
parent4332edcc3e311337bc31a6f5de881a77264d52f2 (diff)
EditMesh: add cube interactive tool
Initial add-cube tool which uses the scale cage to resize. The 3D cursor is currently used to project the cursor onto. We'll likely have more orientation options in the future.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index b7aa7cf1ccf..8e08514a028 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -249,6 +249,19 @@ class _defs_edit_armature:
class _defs_edit_mesh:
+
+ @ToolDef.from_fn
+ def cube_add():
+ return dict(
+ text="Add Cube",
+ icon="ops.mesh.primitive_cube_add_manipulator",
+ widget=None,
+ keymap=(
+ ("view3d.cursor3d", dict(), dict(type='ACTIONMOUSE', value='CLICK')),
+ ("mesh.primitive_cube_add_manipulator", dict(), dict(type='EVT_TWEAK_A', value='ANY')),
+ ),
+ )
+
@ToolDef.from_fn
def rip_region():
return dict(
@@ -743,6 +756,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
None,
*_tools_transform,
None,
+ _defs_edit_mesh.cube_add,
+ None,
(
_defs_edit_mesh.extrude,
_defs_edit_mesh.extrude_individual,