2026-03-16

This commit is contained in:
2026-03-17 15:39:39 -06:00
parent 67782275d5
commit 330fed4231
29 changed files with 532 additions and 199 deletions
@@ -25,7 +25,7 @@ def update_brushstroke_method(self, context):
preset_object = bpy.data.objects.get(preset_name)
settings.preset_object = preset_object
style_object = utils.get_active_context_brushstrokes_object(context)
style_object = utils.get_active_context_brushstrokes_object(context.scene)
if not style_object:
style_object = preset_object
@@ -45,7 +45,7 @@ def update_context_material(self, context):
if settings.silent_switch:
return
style_object = utils.get_active_context_brushstrokes_object(context)
style_object = utils.get_active_context_brushstrokes_object(context.scene)
if not style_object:
style_object = settings.preset_object
if not style_object:
@@ -119,7 +119,14 @@ def get_active_context_brushstrokes_index(self):
return self["active_context_brushstrokes_index"]
def set_active_context_brushstrokes_index(self, value):
settings = bpy.context.scene.BSBST_settings
scene = self.id_data
settings = scene.BSBST_settings
for window in bpy.context.window_manager.windows:
if window.scene == scene:
view_layer = window.view_layer
active_object = view_layer.objects.active
if not settings.context_brushstrokes:
if not settings.preset_object:
return
@@ -136,12 +143,11 @@ def set_active_context_brushstrokes_index(self, value):
return
if not bs_ob:
return
if not bpy.context.object:
if not active_object:
return
view_layer = bpy.context.view_layer
if bpy.context.object.visible_get(view_layer = view_layer):
if active_object.visible_get(view_layer = view_layer):
bpy.ops.object.mode_set(mode='OBJECT')
bpy.context.view_layer.objects.active = bs_ob
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:
@@ -257,7 +263,7 @@ class BSBST_Settings(bpy.types.PropertyGroup):
gpv3 = bpy.context.preferences.experimental.use_grease_pencil_version3
except:
v0, v1, v3 = bpy.app.version
gpv3 = v0 >= 4 and v1 >= 3
gpv3 = v0 >= 4 or (v0 == 4 and v1 >= 3)
curve_mode: bpy.props.EnumProperty(default='CURVES',
items= [('CURVE', 'Legacy', 'Use legacy curve type (Limited Support)', 'CURVE_DATA', 0),\
('CURVES', 'Curves', 'Use hair curves (Fully supported)', 'CURVES_DATA', 1),