[Bf-extensions-cvs] [ee577f16] master: PDT: Allow User to Move Empties (enhancement)
Alan Odom
noreply at git.blender.org
Sat Mar 28 18:59:43 CET 2020
Commit: ee577f162df26669b9851be64a2a9ace44917496
Author: Alan Odom
Date: Sat Mar 14 11:22:00 2020 +0000
Branches: master
https://developer.blender.org/rBAee577f162df26669b9851be64a2a9ace44917496
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.
===================================================================
M precision_drawing_tools/pdt_command.py
===================================================================
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")
More information about the Bf-extensions-cvs
mailing list