Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_paint_common.py
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| if brush.brush_capabilities.has_smooth_stroke: | if brush.brush_capabilities.has_smooth_stroke: | ||||
| return True | return True | ||||
| return False | return False | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| settings = self.paint_settings(context) | settings = self.paint_settings(context) | ||||
| brush = settings.brush | brush = settings.brush | ||||
| self.layout.prop(brush, "use_smooth_stroke", text="") | self.layout.prop(brush, "use_smooth_stroke", text=self.bl_label if self.is_popover else "") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| layout.use_property_decorate = False | layout.use_property_decorate = False | ||||
| settings = self.paint_settings(context) | settings = self.paint_settings(context) | ||||
| brush = settings.brush | brush = settings.brush | ||||
| ▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
| mode = self.get_brush_mode(context) | mode = self.get_brush_mode(context) | ||||
| settings = self.paint_settings(context) | settings = self.paint_settings(context) | ||||
| brush = settings.brush | brush = settings.brush | ||||
| tex_slot = brush.texture_slot | tex_slot = brush.texture_slot | ||||
| tex_slot_mask = brush.mask_texture_slot | tex_slot_mask = brush.mask_texture_slot | ||||
| if self.is_popover: | if self.is_popover: | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.prop(settings, "show_brush", text="") | row.prop(settings, "show_brush", text="Display Cursor") | ||||
| row.label(text="Display Cursor") | |||||
| col = layout.column() | col = layout.column() | ||||
| col.active = brush.brush_capabilities.has_overlay and settings.show_brush | col.active = brush.brush_capabilities.has_overlay and settings.show_brush | ||||
| col.prop(brush, "cursor_color_add", text="Cursor Color") | col.prop(brush, "cursor_color_add", text="Cursor Color") | ||||
| if mode == 'SCULPT' and brush.sculpt_capabilities.has_secondary_color: | if mode == 'SCULPT' and brush.sculpt_capabilities.has_secondary_color: | ||||
| col.prop(brush, "cursor_color_subtract", text="Inverse Color") | col.prop(brush, "cursor_color_subtract", text="Inverse Color") | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||