Brushstroke Tools: Initial Version #328

Merged
Simon Thommes merged 229 commits from SimonThommes/blender-studio-tools:brushstroke_tools-initial-version into main 2024-11-06 15:03:47 +01:00
Showing only changes of commit 1ae920d9db - Show all commits

View File

@ -276,12 +276,17 @@ class BSBST_OT_delete_brushstrokes(bpy.types.Operator):
settings.edit_toggle = edit_toggle settings.edit_toggle = edit_toggle
return {"CANCELLED"} return {"CANCELLED"}
surface_object = utils.get_surface_object(bs_ob)
flow_object = utils.get_flow_object(bs_ob) flow_object = utils.get_flow_object(bs_ob)
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)
if surface_object:
context.view_layer.objects.active = surface_object
surface_object.select_set(True)
if not flow_object: if not flow_object:
settings.edit_toggle = edit_toggle settings.edit_toggle = edit_toggle
return {"FINISHED"} return {"FINISHED"}