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

View File

@ -100,7 +100,9 @@ class BSBST_OT_new_brushstrokes(bpy.types.Operator):
bpy.ops.object.material_slot_add() bpy.ops.object.material_slot_add()
brushstrokes_object.material_slots[0].material = settings.preset_material brushstrokes_object.material_slots[0].material = settings.preset_material
if settings.preset_object: if not settings.preset_object:
bpy.ops.brushstroke_tools.init_preset()
# transfer preset modifiers to new brushstrokes # transfer preset modifiers to new brushstrokes
for mod in settings.preset_object.modifiers: for mod in settings.preset_object.modifiers:
utils.transfer_modifier(mod.name, brushstrokes_object, settings.preset_object) utils.transfer_modifier(mod.name, brushstrokes_object, settings.preset_object)
@ -117,11 +119,6 @@ class BSBST_OT_new_brushstrokes(bpy.types.Operator):
# refresh UI # refresh UI
for mod in brushstrokes_object.modifiers: for mod in brushstrokes_object.modifiers:
mod.node_group.interface_update(context) mod.node_group.interface_update(context)
else:
# add deformation modifier
mod = brushstrokes_object.modifiers.new('Brushstrokes Deformation', 'NODES')
mod.node_group = bpy.data.node_groups['.brushstroke_tools.deformation']
mod['Socket_2'] = surface_object
if settings.assign_materials: if settings.assign_materials:
for mod in brushstrokes_object.modifiers: for mod in brushstrokes_object.modifiers: