Brushstroke Tools: Initial Version #328
@ -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_2', 'FLOW_OBJECT')
|
||||||
utils.mark_socket_context_type(mod_info, 'Socket_3', 'UVMAP')
|
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_9', 'RANDOM')
|
||||||
|
utils.mark_socket_context_type(mod_info, 'Socket_12', 'MATERIAL')
|
||||||
utils.mark_socket_context_type(mod_info, 'Socket_60', 'FLOW_OBJECT')
|
utils.mark_socket_context_type(mod_info, 'Socket_60', 'FLOW_OBJECT')
|
||||||
|
|
||||||
# ui visibility settings
|
# ui visibility settings
|
||||||
@ -323,7 +324,6 @@ class BSBST_OT_init_preset(bpy.types.Operator):
|
|||||||
for p in hide_panels:
|
for p in hide_panels:
|
||||||
utils.mark_panel_hidden(mod_info, p)
|
utils.mark_panel_hidden(mod_info, p)
|
||||||
|
|
||||||
|
|
||||||
def init_draw(self, context):
|
def init_draw(self, context):
|
||||||
settings = context.scene.BSBST_settings
|
settings = context.scene.BSBST_settings
|
||||||
|
|
||||||
@ -351,6 +351,7 @@ class BSBST_OT_init_preset(bpy.types.Operator):
|
|||||||
mod_info.name = mod.name
|
mod_info.name = mod.name
|
||||||
|
|
||||||
utils.mark_socket_context_type(mod_info, 'Socket_2', 'SURFACE_OBJECT')
|
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')
|
utils.mark_socket_context_type(mod_info, 'Socket_6', 'RANDOM')
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
@ -367,6 +368,9 @@ class BSBST_OT_init_preset(bpy.types.Operator):
|
|||||||
elif settings.brushstroke_method == "SURFACE_DRAW":
|
elif settings.brushstroke_method == "SURFACE_DRAW":
|
||||||
self.init_draw(context)
|
self.init_draw(context)
|
||||||
|
|
||||||
|
# select preset material
|
||||||
|
settings.preset_material = bpy.data.materials['Brushstrokes']
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
class BSBST_OT_make_preset(bpy.types.Operator):
|
class BSBST_OT_make_preset(bpy.types.Operator):
|
||||||
|
Loading…
Reference in New Issue
Block a user