bump to v0.0.7: Add convert to empties operator and add icon to specials menu operator #6
14
__init__.py
14
__init__.py
@ -304,10 +304,8 @@ class C3DB_OT_move_down_list(bpy.types.Operator):
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
# TODO see how to sync the names too.
|
||||
class C3DB_OT_convert_all_to_empties(bpy.types.Operator):
|
||||
"""Convert all 3D Cursors to empty objects. This operator is inactive if:
|
||||
You are not in Object Mode ..."""
|
||||
"""Convert all 3D Cursors to empty objects. This operator is inactive if: You are not in Object Mode ..."""
|
||||
|
||||
bl_idname = "c3db.convert_all_to_empties"
|
||||
bl_label = "Convert All 3D Cursors to Empties"
|
||||
@ -342,13 +340,14 @@ class C3DB_OT_convert_all_to_empties(bpy.types.Operator):
|
||||
location=c3db_3d_cursor.location,
|
||||
rotation=rotation_euler,
|
||||
)
|
||||
|
||||
bpy.context.object.name = c3db_3d_cursor.name
|
||||
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
# TODO see how to sync the names too.
|
||||
class C3DB_OT_convert_selected_to_empty(bpy.types.Operator):
|
||||
"""Convert selected 3D Cursor to an empty object. This operator is inactive if:
|
||||
You are not in Object Mode ..."""
|
||||
"""Convert selected 3D Cursor to an empty object. This operator is inactive if: You are not in Object Mode ..."""
|
||||
|
||||
bl_idname = "c3db.convert_selected_to_empty"
|
||||
bl_label = "Convert Selected 3D Cursor to Empty"
|
||||
@ -381,6 +380,9 @@ class C3DB_OT_convert_selected_to_empty(bpy.types.Operator):
|
||||
bpy.ops.object.empty_add(
|
||||
type="PLAIN_AXES", radius=1, location=item.location, rotation=rotation_euler
|
||||
)
|
||||
|
||||
bpy.context.object.name = item.name
|
||||
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user