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 af17e5dbe0 - Show all commits

View File

@ -75,14 +75,17 @@ class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
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.operator("brushstroke_tools.new_brushstrokes", icon='BRUSH_DATA')
settings_header, settings_panel = layout.panel("brushstrokes_settings", default_closed=True)
settings_header.label(text="Settings")
if settings_panel:
settings_panel.prop(settings, 'assign_materials')
row = settings_panel.row()
row.prop(settings, 'style_context', expand=True)
layout.operator("brushstroke_tools.new_brushstrokes", icon='ADD')
new_advanced_header, new_advanced_panel = layout.panel("new_advanced", default_closed=True)
new_advanced_header.label(text='Advanced')
if new_advanced_panel:
new_advanced_panel.row().prop(settings, 'curve_mode', expand=True)
if settings.curve_mode in ['CURVE', 'GP']:
new_advanced_panel.label(text='Curve mode does not support drawing on deformed geometry', icon='ERROR')
new_advanced_panel.prop(settings, 'assign_materials')
row = new_advanced_panel.row()
# identify style context
style_object = context.object if settings.style_context=='BRUSHSTROKES' else settings.preset_object
@ -94,11 +97,13 @@ class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
is_preset = style_object == settings.preset_object
style_header, style_panel = layout.panel("brushstrokes_style", default_closed=False)
if is_preset:
style_header.label(text="Style (Preset)", icon='SETTINGS')
else:
style_header.label(text="Style (Brushstrokes)", icon='OUTLINER_OB_GREASEPENCIL')
style_header.label(text="Style (Brushstrokes)", icon='BRUSH_DATA')
style_header.operator('brushstroke_tools.make_preset', text='', icon='DECORATE_OVERRIDE')
style_header.row().prop(settings, 'style_context', icon_only=True, expand=True)
if style_panel:
style_panel.prop(settings, 'preset_material', icon='MATERIAL')