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
2 changed files with 9 additions and 6 deletions
Showing only changes of commit 969dd44df8 - Show all commits

View File

@ -13,10 +13,14 @@ class BSBST_Settings(bpy.types.PropertyGroup):
preset_object: bpy.props.PointerProperty(type=bpy.types.Object, name="Preset Object")
preset_material: bpy.props.PointerProperty(type=bpy.types.Material, name="Preset Material")
assign_materials: bpy.props.BoolProperty(name='Assign Modifier Materials', default=True)
brushstroke_method: bpy.props.EnumProperty(default='SURFACE_FILL',
items= [('SURFACE_FILL', 'Fill', 'Use surface fill method for new brushstroke object', 'OUTLINER_OB_FORCE_FIELD', 0),\
('SURFACE_DRAW', 'Draw', 'Use surface draw method for new brushstroke object', 'OUTLINER_DATA_GP_LAYER', 1),
])
style_context: bpy.props.EnumProperty(default='AUTO',
items= [('PRESET', 'Preset', 'Specify the style of the current preset used for new brushstrokes', '', 0),\
('BRUSHSTROKES', 'Brushstrokes', 'Specify the style of the currently active brushstrokes', '', 1),
('AUTO', 'Auto', 'Specify the style of either the active brushstrokes or the preset depending on the context', '', 2),
items= [('PRESET', 'Preset', 'Specify the style of the current preset used for new brushstrokes', 'SETTINGS', 0),\
('BRUSHSTROKES', 'Brushstrokes', 'Specify the style of the currently active brushstrokes', 'BRUSH_DATA', 1),
('AUTO', 'Auto', 'Specify the style of either the active brushstrokes or the preset depending on the context', 'AUTO', 2),
])
try:

View File

@ -72,9 +72,8 @@ class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
surface_object = context.object
layout.label(text=f'Surface Object: {surface_object.name}' if surface_object else 'No Surface Object', icon='OUTLINER_OB_SURFACE')
layout.prop(settings, 'curve_mode', expand=True)
if settings.curve_mode in ['CURVE', 'GP']:
layout.label(text='Curve mode does not support drawing on deformed geometry', icon='ERROR')
layout.prop(settings, 'brushstroke_method', expand=True)
layout.operator("brushstroke_tools.new_brushstrokes", icon='ADD')
new_advanced_header, new_advanced_panel = layout.panel("new_advanced", default_closed=True)