fix move 2 cursor error
This commit is contained in:
parent
b3ee636848
commit
c74141a346
@ -111,7 +111,7 @@ class BALLANCE_OT_add_rail(bpy.types.Operator):
|
||||
bpy.ops.object.join()
|
||||
|
||||
# apply 3d cursor
|
||||
firstObj.matrix_world = bpy.context.scene.cursor.matrix
|
||||
utils.Move2Cursor(firstObj)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
@ -11,8 +11,11 @@ def ShowMessageBox(message, title, icon):
|
||||
bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)
|
||||
|
||||
def AddSceneAndMove2Cursor(obj):
|
||||
obj.matrix_world = bpy.context.scene.cursor.matrix
|
||||
Move2Cursor(obj)
|
||||
|
||||
view_layer = bpy.context.view_layer
|
||||
collection = view_layer.active_layer_collection.collection
|
||||
collection.objects.link(obj)
|
||||
|
||||
def Move2Cursor(obj):
|
||||
obj.location = bpy.context.scene.cursor.location
|
||||
|
Loading…
Reference in New Issue
Block a user