Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tk_utils/object_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def MoveAllFailsafe(context, move_target, destination):
BLENDER 2.8 - This also uses a region to ensure that it moves in a 3D View region that hasnt been deallocated.
"""
# ///////////////////////////////
# WARNING - WARNING - WARNING - WARNING - WARNING - WARNING
# WARNING - WARNING - WARNING - WARNING - WARNING - WARNING
# The context override is known to crash only when testing.
# Under normal circumstances this function is completely safe.
# ///////////////////////////////
Expand Down Expand Up @@ -40,7 +40,7 @@ def MoveAllFailsafe(context, move_target, destination):
# Calculate the translation vector using the 3D cursor
bpy.ops.object.select_all(action = 'DESELECT')
FocusObject(move_target)

bpy.ops.view3d.snap_cursor_to_selected()

root_location = (0.0, 0.0, 0.0)
Expand Down Expand Up @@ -70,7 +70,7 @@ def MoveAllFailsafe(context, move_target, destination):
snap = False,
release_confirm = False,
)

bpy.ops.object.mode_set(mode = previous_mode)

# Position the cursor back to it's original location
Expand All @@ -95,7 +95,7 @@ def MoveObjectFailsafe(target, context, location):

override = Find3DViewContext()

with context.temp_override(window = override['window'], area = override['area'],
with context.temp_override(window = override['window'], area = override['area'],
region = override['region']):

copy_location = Vector((location[0], location[1], location[2]))
Expand Down Expand Up @@ -199,7 +199,7 @@ def MoveBone(target, bone, context, location):
constraint_axis= (False, False, False),
orient_type = 'GLOBAL',
mirror= False,
use_proportional_edit= 'DISABLED',
use_proportional_edit= False,
snap= False,
snap_target= 'CLOSEST',
snap_point= (0.0, 0.0, 0.0),
Expand Down