Skip to content
Snippets Groups Projects
Commit ee577f16 authored by Alan Odom's avatar Alan Odom Committed by Rune Morling
Browse files

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.
parent 639e1d3a
No related branches found
No related tags found
No related merge requests found
...@@ -156,7 +156,7 @@ def command_run(self, context): ...@@ -156,7 +156,7 @@ def command_run(self, context):
# Check Object Type & Mode First # Check Object Type & Mode First
obj = context.view_layer.objects.active obj = context.view_layer.objects.active
if obj is not None and command[0].upper() not in {"M", "?", "HELP"}: 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 pg.error = PDT_OBJ_MODE_ERROR
context.window_manager.popup_menu(oops, title="Error", icon="ERROR") context.window_manager.popup_menu(oops, title="Error", icon="ERROR")
raise PDT_ObjectModeError raise PDT_ObjectModeError
...@@ -460,9 +460,10 @@ def command_parse(context): ...@@ -460,9 +460,10 @@ def command_parse(context):
obj_loc = obj.matrix_world.decompose()[0] obj_loc = obj.matrix_world.decompose()[0]
verts = [] verts = []
else: else:
pg.error = PDT_OBJ_MODE_ERROR if operation not in {"G"}:
context.window_manager.popup_menu(oops, title="Error", icon="ERROR") pg.error = PDT_OBJ_MODE_ERROR
raise PDT_ObjectModeError context.window_manager.popup_menu(oops, title="Error", icon="ERROR")
raise PDT_ObjectModeError
else: else:
pg.error = PDT_ERR_NO_ACT_OBJ pg.error = PDT_ERR_NO_ACT_OBJ
context.window_manager.popup_menu(oops, title="Error", icon="ERROR") context.window_manager.popup_menu(oops, title="Error", icon="ERROR")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment