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