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 09f3c83e43 - Show all commits

View File

@ -266,18 +266,19 @@ def draw_effect_panel_recursive(effects_panel, material, prev_node):
def draw_advanced_settings(layout, settings): def draw_advanced_settings(layout, settings):
new_advanced_header, new_advanced_panel = layout.panel("new_advanced", default_closed=True) new_advanced_header, new_advanced_panel = layout.panel("new_advanced", default_closed=True)
new_advanced_header.label(text='Advanced') new_advanced_header.label(text='Advanced')
if new_advanced_panel: if not new_advanced_panel:
new_advanced_panel.row().prop(settings, 'curve_mode', expand=True) return
if settings.curve_mode in ['CURVE', 'GP']: new_advanced_panel.row().prop(settings, 'curve_mode', expand=True)
new_advanced_panel.label(text='Curve mode does not support drawing on deformed geometry', icon='ERROR') 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, 'animated') new_advanced_panel.prop(settings, 'animated')
new_advanced_panel.prop(settings, 'deforming_surface') new_advanced_panel.prop(settings, 'deforming_surface')
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, 'reuse_flow')
new_advanced_panel.prop(settings, 'estimate_dimensions') new_advanced_panel.prop(settings, 'estimate_dimensions')
new_advanced_panel.prop(settings, 'style_context') new_advanced_panel.prop(settings, 'style_context')
new_advanced_panel.operator('brushstroke_tools.render_setup') new_advanced_panel.operator('brushstroke_tools.render_setup')
def draw_shape_properties(layout, settings, style_object, is_preset, display_mode): def draw_shape_properties(layout, settings, style_object, is_preset, display_mode):
if not style_object: if not style_object:
@ -344,8 +345,11 @@ def draw_settings_properties(layout, settings, style_object):
layout.prop(style_object, 'visible_shadow', icon='LIGHT', emboss=True) layout.prop(style_object, 'visible_shadow', icon='LIGHT', emboss=True)
def draw_properties_panel(layout, settings, style_object, surface_object, is_preset, display_mode): def draw_properties_panel(layout, settings, style_object, surface_object, is_preset, display_mode):
layout.separator(type='LINE')
row = layout.row(align=True) row = layout.row(align=True)
row.prop(settings, 'view_tab', expand=True) row.prop(settings, 'view_tab', expand=True)
layout.separator(factor=.0, type='SPACE')
if settings.view_tab == 'MATERIAL': if settings.view_tab == 'MATERIAL':
draw_material_properties(layout, settings, surface_object) draw_material_properties(layout, settings, surface_object)