Brushstroke Tools: Initial Version #328
@ -295,7 +295,8 @@ class BSBST_OT_delete_brushstrokes(bpy.types.Operator):
|
||||
flow_object = utils.get_flow_object(bs_ob)
|
||||
|
||||
if context.active_object:
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
if context.mode != 'OBJECT':
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
bpy.data.objects.remove(bs_ob)
|
||||
settings.active_context_brushstrokes_index = max(0, settings.active_context_brushstrokes_index-1)
|
||||
|
||||
@ -340,10 +341,12 @@ class BSBST_OT_duplicate_brushstrokes(bpy.types.Operator):
|
||||
|
||||
flow_object = utils.get_flow_object(bs_ob)
|
||||
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
if context.mode != 'OBJECT':
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
|
||||
bpy.context.view_layer.objects.active = bs_ob
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
if context.mode != 'OBJECT':
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
for ob in bpy.data.objects:
|
||||
ob.select_set(False)
|
||||
bs_ob.select_set(True)
|
||||
@ -409,7 +412,8 @@ class BSBST_OT_copy_brushstrokes(bpy.types.Operator):
|
||||
if not bs_objects:
|
||||
return {"CANCELLED"}
|
||||
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
if context.mode != 'OBJECT':
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
for surface_object in surface_objects:
|
||||
for ob in bpy.data.objects:
|
||||
ob.select_set(False)
|
||||
|
Loading…
Reference in New Issue
Block a user