Brushstroke Tools: Initial Version #328
@ -83,6 +83,13 @@ 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 = 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))
|
flow_object = self.new_flow_object(context, utils.flow_name(name))
|
||||||
|
|
||||||
# attach surface object pointer
|
# attach surface object pointer
|
||||||
|
@ -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,
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user