Brushstroke Tools: Initial Version #328
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user