Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Odom <clockmender@icloud.com>2020-03-14 14:22:00 +0300
committerRune Morling <ermo.blender.org@spammesenseless.net>2020-03-28 20:56:16 +0300
commitee577f162df26669b9851be64a2a9ace44917496 (patch)
tree8608dd669776463b4cb759c82093a88e164012eb /precision_drawing_tools
parent639e1d3adc9861babb335566e4502ad07d04f12e (diff)
PDT: Allow User to Move Empties (enhancement)
This enhancement allows users to move Empties, so they can be used as a parent object for other objects. Allows movement by Delta, Direction and Absolute.
Diffstat (limited to 'precision_drawing_tools')
-rw-r--r--precision_drawing_tools/pdt_command.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/precision_drawing_tools/pdt_command.py b/precision_drawing_tools/pdt_command.py
index 5b4b30c1..fa7d43bf 100644
--- a/precision_drawing_tools/pdt_command.py
+++ b/precision_drawing_tools/pdt_command.py
@@ -156,7 +156,7 @@ def command_run(self, context):
# Check Object Type & Mode First
obj = context.view_layer.objects.active
if obj is not None and command[0].upper() not in {"M", "?", "HELP"}:
- if obj.mode not in {"OBJECT", "EDIT"} or obj.type != "MESH":
+ if obj.mode not in {"OBJECT", "EDIT"} or obj.type not in {"MESH", "EMPTY"}:
pg.error = PDT_OBJ_MODE_ERROR
context.window_manager.popup_menu(oops, title="Error", icon="ERROR")
raise PDT_ObjectModeError
@@ -460,9 +460,10 @@ def command_parse(context):
obj_loc = obj.matrix_world.decompose()[0]
verts = []
else:
- pg.error = PDT_OBJ_MODE_ERROR
- context.window_manager.popup_menu(oops, title="Error", icon="ERROR")
- raise PDT_ObjectModeError
+ if operation not in {"G"}:
+ pg.error = PDT_OBJ_MODE_ERROR
+ context.window_manager.popup_menu(oops, title="Error", icon="ERROR")
+ raise PDT_ObjectModeError
else:
pg.error = PDT_ERR_NO_ACT_OBJ
context.window_manager.popup_menu(oops, title="Error", icon="ERROR")