Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_image.py
| Show First 20 Lines • Show All 1,432 Lines • ▼ Show 20 Lines | class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel): | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| tool_settings = context.tool_settings.image_paint | tool_settings = context.tool_settings.image_paint | ||||
| brush = tool_settings.brush | brush = tool_settings.brush | ||||
| col = layout.column(align=True) | |||||
| row = col.row(align=True) | |||||
| row.prop(brush, "curve_preset", text="") | |||||
| if brush.curve_preset == 'CUSTOM': | |||||
| layout.template_curve_mapping(brush, "curve") | layout.template_curve_mapping(brush, "curve") | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' | row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' | ||||
| row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' | row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' | ||||
| row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' | row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' | ||||
| row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' | row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' | ||||
| row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' | row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' | ||||
| row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' | row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' | ||||
| class IMAGE_PT_tools_imagepaint_symmetry(BrushButtonsPanel, Panel): | class IMAGE_PT_tools_imagepaint_symmetry(BrushButtonsPanel, Panel): | ||||
| bl_context = ".imagepaint_2d" | bl_context = ".imagepaint_2d" | ||||
| bl_label = "Tiling" | bl_label = "Tiling" | ||||
| bl_category = "Tool" | bl_category = "Tool" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| ▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | class IMAGE_PT_uv_sculpt_curve(Panel): | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| tool_settings = context.tool_settings | tool_settings = context.tool_settings | ||||
| uvsculpt = tool_settings.uv_sculpt | uvsculpt = tool_settings.uv_sculpt | ||||
| brush = uvsculpt.brush | brush = uvsculpt.brush | ||||
| if brush is not None: | if brush is not None: | ||||
| col = layout.column(align=True) | |||||
| row = col.row(align=True) | |||||
| row.prop(brush, "curve_preset", text="") | |||||
| if brush.curve_preset == 'CUSTOM': | |||||
| layout.template_curve_mapping(brush, "curve") | layout.template_curve_mapping(brush, "curve") | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' | row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' | ||||
| row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' | row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' | ||||
| row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' | row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' | ||||
| row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' | row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' | ||||
| row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' | row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' | ||||
| row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' | row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' | ||||
| class ImageScopesPanel: | class ImageScopesPanel: | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| sima = context.space_data | sima = context.space_data | ||||
| if not (sima and sima.image): | if not (sima and sima.image): | ||||
| ▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines | |||||