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 e134eb2d0e - Show all commits

View File

@ -149,7 +149,11 @@ def set_active_context_brushstrokes_index(self, value):
bs_ob = bpy.data.objects.get(self.context_brushstrokes[value].name)
if not bs_ob:
return
view_layer = bpy.context.view_layer
if bpy.context.object.visible_get(view_layer = view_layer):
bpy.ops.object.mode_set(mode='OBJECT')
bpy.context.view_layer.objects.active = bs_ob
if bs_ob.visible_get(view_layer = view_layer):
bpy.ops.object.mode_set(mode='OBJECT')
for ob in bpy.data.objects:
ob.select_set(False)
@ -157,7 +161,7 @@ def set_active_context_brushstrokes_index(self, value):
ob['BSBST_active'] = False
bs_ob.select_set(True)
bs_ob['BSBST_active'] = True
if settings.edit_toggle:
if settings.edit_toggle and bs_ob.visible_get(view_layer = view_layer):
utils.edit_active_brushstrokes(bpy.context)
if 'BSBST_material' in bs_ob.keys():
settings.context_material = bs_ob['BSBST_material']