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
3 changed files with 12 additions and 1 deletions
Showing only changes of commit b938c8909b - Show all commits

View File

@ -83,7 +83,14 @@ class BSBST_OT_new_brushstrokes(bpy.types.Operator):
brushstrokes_object = self.new_brushstrokes_object(context, name) brushstrokes_object = self.new_brushstrokes_object(context, name)
flow_is_required = settings.brushstroke_method == 'SURFACE_FILL' flow_is_required = settings.brushstroke_method == 'SURFACE_FILL'
if flow_is_required: if flow_is_required:
flow_object = self.new_flow_object(context, utils.flow_name(name)) flow_object = None
if settings.reuse_flow:
if settings.context_brushstrokes:
bs = bpy.data.objects.get(settings.context_brushstrokes[settings.active_context_brushstrokes_index].name)
if 'BSBST_flow_object' in bs.keys():
flow_object = bs['BSBST_flow_object']
if not flow_object:
flow_object = self.new_flow_object(context, utils.flow_name(name))
# attach surface object pointer # attach surface object pointer
if surface_object: if surface_object:

View File

@ -171,6 +171,9 @@ class BSBST_Settings(bpy.types.PropertyGroup):
ui_options: bpy.props.BoolProperty(default=False, ui_options: bpy.props.BoolProperty(default=False,
name='UI Options', name='UI Options',
description="Show advanced UI options to customize exposed parameters") description="Show advanced UI options to customize exposed parameters")
reuse_flow: bpy.props.BoolProperty(default=False,
name='Re-use Flow Object',
description="Re-use flow object from active brushstrokes if applicable")
classes = [ classes = [
BSBST_socket_info, BSBST_socket_info,

View File

@ -156,6 +156,7 @@ class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
new_advanced_panel.label(text='Curve mode does not support drawing on deformed geometry', icon='ERROR') new_advanced_panel.label(text='Curve mode does not support drawing on deformed geometry', icon='ERROR')
new_advanced_panel.prop(settings, 'assign_materials') new_advanced_panel.prop(settings, 'assign_materials')
new_advanced_panel.prop(settings, 'reuse_flow')
new_advanced_panel.prop(settings, 'style_context') new_advanced_panel.prop(settings, 'style_context')
# identify style context # identify style context