Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
| Show First 20 Lines • Show All 307 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| sub.active = brush.use_custom_icon | sub.active = brush.use_custom_icon | ||||
| sub.prop(brush, "icon_filepath", text="") | sub.prop(brush, "icon_filepath", text="") | ||||
| layout.prop(gp_settings, "use_cursor", text="Show Brush") | layout.prop(gp_settings, "use_cursor", text="Show Brush") | ||||
| if brush.gpencil_tool == 'DRAW': | if brush.gpencil_tool == 'DRAW': | ||||
| layout.prop(gp_settings, "show_lasso", text="Show Fill Color While Drawing") | layout.prop(gp_settings, "show_lasso", text="Show Fill Color While Drawing") | ||||
| if brush.gpencil_tool == 'FILL': | |||||
| layout.prop(brush, "cursor_color_add", text="Color") | |||||
| elif ob.mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}: | elif ob.mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}: | ||||
| settings = tool_settings.gpencil_sculpt | settings = tool_settings.gpencil_sculpt | ||||
| brush = settings.brush | brush = settings.brush | ||||
| tool = settings.sculpt_tool | tool = settings.sculpt_tool | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.prop(brush, "use_cursor", text="Show Brush") | col.prop(brush, "use_cursor", text="Show Brush") | ||||
| if tool in {'THICKNESS', 'STRENGTH'}: | |||||
| col.prop(brush, "cursor_color_add", text="Add") | |||||
| col.prop(brush, "cursor_color_sub", text="Subtract") | |||||
| elif tool == 'PINCH': | |||||
| col.prop(brush, "cursor_color_add", text="Pinch") | |||||
| col.prop(brush, "cursor_color_sub", text="Inflate") | |||||
| elif tool == 'TWIST': | |||||
| col.prop(brush, "cursor_color_add", text="CCW") | |||||
| col.prop(brush, "cursor_color_sub", text="CW") | |||||
| else: | |||||
| col.prop(brush, "cursor_color_add", text="") | |||||
| class GPENCIL_MT_pie_tool_palette(Menu): | class GPENCIL_MT_pie_tool_palette(Menu): | ||||
| """A pie menu for quick access to Grease Pencil tools""" | """A pie menu for quick access to Grease Pencil tools""" | ||||
| bl_label = "Grease Pencil Tools" | bl_label = "Grease Pencil Tools" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| pie = layout.menu_pie() | pie = layout.menu_pie() | ||||
| ▲ Show 20 Lines • Show All 652 Lines • Show Last 20 Lines | |||||