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 4c63bc2a2c - Show all commits

View File

@ -297,6 +297,7 @@ class BSBST_OT_init_preset(bpy.types.Operator):
utils.mark_socket_context_type(mod_info, 'Socket_2', 'FLOW_OBJECT')
utils.mark_socket_context_type(mod_info, 'Socket_3', 'UVMAP')
utils.mark_socket_context_type(mod_info, 'Socket_9', 'RANDOM')
utils.mark_socket_context_type(mod_info, 'Socket_12', 'MATERIAL')
utils.mark_socket_context_type(mod_info, 'Socket_60', 'FLOW_OBJECT')
# ui visibility settings
@ -323,7 +324,6 @@ class BSBST_OT_init_preset(bpy.types.Operator):
for p in hide_panels:
utils.mark_panel_hidden(mod_info, p)
def init_draw(self, context):
settings = context.scene.BSBST_settings
@ -351,6 +351,7 @@ class BSBST_OT_init_preset(bpy.types.Operator):
mod_info.name = mod.name
utils.mark_socket_context_type(mod_info, 'Socket_2', 'SURFACE_OBJECT')
utils.mark_socket_context_type(mod_info, 'Socket_4', 'MATERIAL')
utils.mark_socket_context_type(mod_info, 'Socket_6', 'RANDOM')
def execute(self, context):
@ -367,6 +368,9 @@ class BSBST_OT_init_preset(bpy.types.Operator):
elif settings.brushstroke_method == "SURFACE_DRAW":
self.init_draw(context)
# select preset material
settings.preset_material = bpy.data.materials['Brushstrokes']
return {"FINISHED"}
class BSBST_OT_make_preset(bpy.types.Operator):