[Bf-blender-cvs] [3e63990dd3a] greasepencil-object: UI: Hide options in weight paint mode
Antonio Vazquez
noreply at git.blender.org
Tue Aug 1 17:39:58 CEST 2017
Commit: 3e63990dd3a444c02fc2782c67befed1bbdaa79b
Author: Antonio Vazquez
Date: Tue Aug 1 17:39:50 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB3e63990dd3a444c02fc2782c67befed1bbdaa79b
UI: Hide options in weight paint mode
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 01f98694eac..b06884e353d 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -435,32 +435,34 @@ class GreasePencilStrokeSculptPanel:
row.prop(brush, "strength", slider=True)
row.prop(brush, "use_pressure_strength", text="")
col.prop(brush, "use_falloff")
- if tool in {'SMOOTH', 'RANDOMIZE'}:
- row = layout.row(align=True)
- row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True)
- row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True)
- row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
- layout.separator()
+ if gpd.is_stroke_sculpt_mode:
+ if tool in {'SMOOTH', 'RANDOMIZE'}:
+ row = layout.row(align=True)
+ row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True)
+ row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True)
+ row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
+
+ layout.separator()
+
+ if tool == 'THICKNESS':
+ layout.row().prop(brush, "direction", expand=True)
+ elif tool == 'PINCH':
+ row = layout.row(align=True)
+ row.prop_enum(brush, "direction", 'ADD', text="Pinch")
+ row.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate")
+ elif settings.tool == 'TWIST':
+ row = layout.row(align=True)
+ row.prop_enum(brush, "direction", 'SUBTRACT', text="CW")
+ row.prop_enum(brush, "direction", 'ADD', text="CCW")
- if tool == 'THICKNESS':
- layout.row().prop(brush, "direction", expand=True)
- elif tool == 'PINCH':
row = layout.row(align=True)
- row.prop_enum(brush, "direction", 'ADD', text="Pinch")
- row.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate")
- elif settings.tool == 'TWIST':
+ row.prop(settings, "use_select_mask")
row = layout.row(align=True)
- row.prop_enum(brush, "direction", 'SUBTRACT', text="CW")
- row.prop_enum(brush, "direction", 'ADD', text="CCW")
-
- row = layout.row(align=True)
- row.prop(settings, "use_select_mask")
- row = layout.row(align=True)
- row.prop(settings, "selection_alpha", slider=True)
+ row.prop(settings, "selection_alpha", slider=True)
- if tool == 'SMOOTH':
- layout.prop(brush, "affect_pressure")
+ if tool == 'SMOOTH':
+ layout.prop(brush, "affect_pressure")
class GreasePencilAppearancePanel:
More information about the Bf-blender-cvs
mailing list