Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d_toolbar.py
| Show All 21 Lines | from bl_ui.properties_grease_pencil_common import ( | ||||
| GreasePencilStrokeEditPanel, | GreasePencilStrokeEditPanel, | ||||
| GreasePencilStrokeSculptPanel, | GreasePencilStrokeSculptPanel, | ||||
| GreasePencilSculptOptionsPanel, | GreasePencilSculptOptionsPanel, | ||||
| GreasePencilAppearancePanel, | GreasePencilAppearancePanel, | ||||
| ) | ) | ||||
| from bl_ui.properties_paint_common import ( | from bl_ui.properties_paint_common import ( | ||||
| UnifiedPaintPanel, | UnifiedPaintPanel, | ||||
| brush_mask_texture_settings, | brush_mask_texture_settings, | ||||
| brush_texpaint_common, | |||||
| brush_texpaint_common_color, | brush_texpaint_common_color, | ||||
| brush_texpaint_common_gradient, | brush_texpaint_common_gradient, | ||||
| brush_texpaint_common_clone, | brush_texpaint_common_clone, | ||||
| brush_texpaint_common_options, | |||||
| brush_texture_settings, | brush_texture_settings, | ||||
| brush_basic_gpencil_paint_settings, | |||||
| brush_basic_gpencil_weight_settings, | |||||
| draw_all_brush_settings | |||||
| ) | ) | ||||
| from bl_ui.utils import PresetPanel | from bl_ui.utils import PresetPanel | ||||
| class VIEW3D_MT_brush_context_menu(Menu): | class VIEW3D_MT_brush_context_menu(Menu): | ||||
| bl_label = "Material Specials" | bl_label = "Material Specials" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| ▲ Show 20 Lines • Show All 279 Lines • ▼ Show 20 Lines | |||||
| class View3DPaintPanel(UnifiedPaintPanel): | class View3DPaintPanel(UnifiedPaintPanel): | ||||
| bl_space_type = 'VIEW_3D' | bl_space_type = 'VIEW_3D' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_category = "Tool" | bl_category = "Tool" | ||||
| class VIEW3D_PT_tools_particlemode(Panel, View3DPaintPanel): | class VIEW3D_PT_tools_particlemode(Panel, View3DPaintPanel): | ||||
| bl_context = ".paint_common" # dot on purpose (access from topbar) | bl_context = ".paint_common" # dot on purpose (access from topbar) | ||||
| bl_label = "Particle tools" | bl_label = "Brush" | ||||
| bl_options = {'HIDE_HEADER'} | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| settings = cls.paint_settings(context) | settings = cls.paint_settings(context) | ||||
| return (settings and settings.brush and context.particle_edit_object) | return (settings and settings.brush and context.particle_edit_object) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | def poll(cls, context): | ||||
| context.image_paint_object)) | context.image_paint_object)) | ||||
| 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 # No animation. | layout.use_property_decorate = False # No animation. | ||||
| settings = self.paint_settings(context) | settings = UnifiedPaintPanel.paint_settings(context) | ||||
| brush = settings.brush | |||||
| if not self.is_popover: | |||||
| row = layout.row() | |||||
| row.column().template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8) | |||||
| row.menu("VIEW3D_MT_brush_context_menu", icon='DOWNARROW_HLT', text="") | |||||
| # Sculpt Mode # | |||||
| if context.sculpt_object and brush: | |||||
| from bl_ui.properties_paint_common import ( | |||||
| brush_basic_sculpt_settings, | |||||
| ) | |||||
| capabilities = brush.sculpt_capabilities | |||||
| col = layout.column() | |||||
| if not self.is_popover: | |||||
| brush_basic_sculpt_settings(col, context, brush) | |||||
| # normal_radius_factor | |||||
| col.separator() | |||||
| row = col.row() | |||||
| row.prop(brush, "normal_radius_factor", slider=True) | |||||
| if brush.sculpt_tool == 'ELASTIC_DEFORM': | |||||
| col.separator() | |||||
| row = col.row() | |||||
| row.prop(brush, "elastic_deform_type") | |||||
| row = col.row() | |||||
| row.prop(brush, "elastic_deform_volume_preservation", slider=True) | |||||
| if brush.sculpt_tool == 'GRAB': | |||||
pablodp606: This property is missing in the patch | |||||
| col.separator() | |||||
| row = col.row() | |||||
| row.prop(brush, "use_grab_active_vertex") | |||||
| # topology_rake_factor | |||||
| if ( | |||||
| capabilities.has_topology_rake and | |||||
| context.sculpt_object.use_dynamic_topology_sculpting | |||||
| ): | |||||
| row = col.row() | |||||
| row.prop(brush, "topology_rake_factor", slider=True) | |||||
| # auto_smooth_factor and use_inverse_smooth_pressure | |||||
| if capabilities.has_auto_smooth: | |||||
| row = col.row(align=True) | |||||
| row.prop(brush, "auto_smooth_factor", slider=True) | |||||
| row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="") | |||||
| # normal_weight | |||||
| if capabilities.has_normal_weight: | |||||
| row = col.row(align=True) | |||||
| row.prop(brush, "normal_weight", slider=True) | |||||
| # crease_pinch_factor | |||||
| if capabilities.has_pinch_factor: | |||||
| row = col.row(align=True) | |||||
| if (brush.sculpt_tool in ('BLOB', 'SNAKE_HOOK')): | |||||
| row.prop(brush, "crease_pinch_factor", slider=True, text="Magnify") | |||||
| else: | |||||
| row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch") | |||||
| # rake_factor | |||||
| if capabilities.has_rake_factor: | |||||
| row = col.row(align=True) | |||||
| row.prop(brush, "rake_factor", slider=True) | |||||
| if brush.sculpt_tool == 'MASK': | |||||
| col.prop(brush, "mask_tool") | |||||
| # plane_offset, use_offset_pressure, use_plane_trim, plane_trim | |||||
| if capabilities.has_plane_offset: | |||||
| row = col.row(align=True) | |||||
| row.prop(brush, "plane_offset", slider=True) | |||||
| row.prop(brush, "use_offset_pressure", text="") | |||||
| col.separator() | |||||
| row = col.row() | |||||
| row.prop(brush, "use_plane_trim", text="Plane Trim") | |||||
| row = col.row() | |||||
| row.active = brush.use_plane_trim | |||||
| row.prop(brush, "plane_trim", slider=True, text="Distance") | |||||
| # height | |||||
| if capabilities.has_height: | |||||
| row = col.row() | |||||
| row.prop(brush, "height", slider=True, text="Height") | |||||
| # use_persistent, set_persistent_base | |||||
| if capabilities.has_persistence: | |||||
| ob = context.sculpt_object | |||||
| do_persistent = True | |||||
| # not supported yet for this case | |||||
| for md in ob.modifiers: | |||||
| if md.type == 'MULTIRES': | |||||
| do_persistent = False | |||||
| break | |||||
| if do_persistent: | |||||
| col.prop(brush, "use_persistent") | |||||
| col.operator("sculpt.set_persistent_base") | |||||
| # Texture Paint Mode # | |||||
| elif context.image_paint_object and brush: | |||||
| brush_texpaint_common(self, context, layout, brush, settings, True) | |||||
| # Weight Paint Mode # | |||||
| elif context.weight_paint_object and brush: | |||||
| from bl_ui.properties_paint_common import ( | |||||
| brush_basic_wpaint_settings, | |||||
| ) | |||||
| col = layout.column() | |||||
| if not self.is_popover: | |||||
| brush_basic_wpaint_settings(col, context, brush) | |||||
| # Vertex Paint Mode # | |||||
| elif context.vertex_paint_object and brush: | |||||
| from bl_ui.properties_paint_common import ( | |||||
| brush_basic_vpaint_settings, | |||||
| ) | |||||
| col = layout.column() | |||||
| if not self.is_popover: | |||||
| brush_basic_vpaint_settings(col, context, brush) | |||||
| class VIEW3D_PT_tools_brush_color(Panel, View3DPaintPanel): | |||||
| bl_context = ".paint_common" # dot on purpose (access from topbar) | |||||
| bl_parent_id = "VIEW3D_PT_tools_brush" | |||||
| bl_label = "Color Picker" | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| settings = cls.paint_settings(context) | |||||
| brush = settings.brush | |||||
| if context.image_paint_object: | |||||
| capabilities = brush.image_paint_capabilities | |||||
| return capabilities.has_color | |||||
| elif context.vertex_paint_object: | |||||
| capabilities = brush.vertex_paint_capabilities | |||||
| return capabilities.has_color | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| settings = self.paint_settings(context) | |||||
| brush = settings.brush | brush = settings.brush | ||||
| if context.vertex_paint_object: | draw_all_brush_settings(layout, context, brush, context.object.mode, popover=self.is_popover) | ||||
| brush_texpaint_common_color(self, context, layout, brush, settings, True) | |||||
| else: | |||||
| layout.prop(brush, "color_type", expand=True) | |||||
| if brush.color_type == 'COLOR': | |||||
| brush_texpaint_common_color(self, context, layout, brush, settings, True) | |||||
| elif brush.color_type == 'GRADIENT': | |||||
| brush_texpaint_common_gradient(self, context, layout, brush, settings, True) | |||||
| class VIEW3D_PT_tools_brush_swatches(Panel, View3DPaintPanel): | class VIEW3D_PT_tools_brush_swatches(Panel, View3DPaintPanel): | ||||
| bl_context = ".paint_common" # dot on purpose (access from topbar) | bl_context = ".paint_common" # dot on purpose (access from topbar) | ||||
| bl_parent_id = "VIEW3D_PT_tools_brush" | bl_parent_id = "VIEW3D_PT_tools_brush" | ||||
| bl_label = "Color Palette" | bl_label = "Color Palette" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| @classmethod | @classmethod | ||||
| Show All 38 Lines | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| settings = self.paint_settings(context) | settings = self.paint_settings(context) | ||||
| brush = settings.brush | brush = settings.brush | ||||
| layout.active = settings.use_clone_layer | layout.active = settings.use_clone_layer | ||||
| brush_texpaint_common_clone(self, context, layout, brush, settings, True) | brush_texpaint_common_clone(self, context, layout, brush, settings, True) | ||||
| class VIEW3D_PT_tools_brush_options(Panel, View3DPaintPanel): | |||||
| bl_context = ".paint_common" # dot on purpose (access from topbar) | |||||
| bl_parent_id = "VIEW3D_PT_tools_brush" | |||||
| bl_label = "Options" | |||||
| bl_options = {'DEFAULT_CLOSED'} | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| tool_settings = context.tool_settings | |||||
| settings = self.paint_settings(context) | |||||
| brush = settings.brush | |||||
| capabilities = brush.sculpt_capabilities | |||||
| layout.use_property_split = True | |||||
| layout.use_property_decorate = False # No animation. | |||||
| col = layout.column() | |||||
| if context.image_paint_object and brush: | |||||
| brush_texpaint_common_options(self, context, layout, brush, settings, True) | |||||
| elif context.sculpt_object and brush: | |||||
| col.prop(brush, "use_automasking_topology") | |||||
| if capabilities.has_accumulate: | |||||
| col.prop(brush, "use_accumulate") | |||||
| UnifiedPaintPanel.prop_unified_size(col, context, brush, "use_locked_size") | |||||
| if capabilities.has_sculpt_plane: | |||||
| col.prop(brush, "sculpt_plane") | |||||
| col.prop(brush, "use_original_normal") | |||||
| col.prop(brush, "use_original_plane") | |||||
| col.prop(brush, "use_frontface", text="Front Faces Only") | |||||
| col.prop(brush, "use_projected") | |||||
| elif context.weight_paint_object and brush: | |||||
| if brush.weight_tool != 'SMEAR': | |||||
| col.prop(brush, "use_accumulate") | |||||
| col.prop(brush, "use_frontface", text="Front Faces Only") | |||||
| col.prop(brush, "use_projected") | |||||
| col.prop(tool_settings, "use_auto_normalize", text="Auto Normalize") | |||||
| col.prop(tool_settings, "use_multipaint", text="Multi-Paint") | |||||
| elif context.vertex_paint_object and brush: | |||||
| if brush.vertex_tool != 'SMEAR': | |||||
| col.prop(brush, "use_accumulate") | |||||
| col.prop(brush, "use_alpha") | |||||
| col.prop(brush, "use_frontface", text="Front Faces Only") | |||||
| col.prop(brush, "use_projected") | |||||
| class TEXTURE_UL_texpaintslots(UIList): | class TEXTURE_UL_texpaintslots(UIList): | ||||
| def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): | def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): | ||||
| # mat = data | # mat = data | ||||
| if self.layout_type in {'DEFAULT', 'COMPACT'}: | if self.layout_type in {'DEFAULT', 'COMPACT'}: | ||||
| layout.prop(item, "name", text="", emboss=False, icon_value=icon) | layout.prop(item, "name", text="", emboss=False, icon_value=icon) | ||||
| elif self.layout_type == 'GRID': | elif self.layout_type == 'GRID': | ||||
| layout.alignment = 'CENTER' | layout.alignment = 'CENTER' | ||||
| ▲ Show 20 Lines • Show All 553 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.prop(mesh, "remesh_voxel_size") | col.prop(mesh, "remesh_voxel_size") | ||||
| col.prop(mesh, "remesh_fix_poles") | col.prop(mesh, "remesh_fix_poles") | ||||
| col.prop(mesh, "remesh_smooth_normals") | col.prop(mesh, "remesh_smooth_normals") | ||||
| col.prop(mesh, "remesh_preserve_volume") | col.prop(mesh, "remesh_preserve_volume") | ||||
| col.prop(mesh, "remesh_preserve_paint_mask") | col.prop(mesh, "remesh_preserve_paint_mask") | ||||
| col.operator("object.voxel_remesh", text="Remesh") | col.operator("object.voxel_remesh", text="Remesh") | ||||
| # TODO, move to space_view3d.py | # TODO, move to space_view3d.py | ||||
| class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): | class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): | ||||
| bl_context = ".sculpt_mode" # dot on purpose (access from topbar) | bl_context = ".sculpt_mode" # dot on purpose (access from topbar) | ||||
| bl_label = "Options" | bl_label = "Options" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.sculpt_object and context.tool_settings.sculpt) | return (context.sculpt_object and context.tool_settings.sculpt) | ||||
| Show All 10 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(sculpt, "use_threaded", text="Threaded Sculpt") | col.prop(sculpt, "use_threaded", text="Threaded Sculpt") | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(sculpt, "show_low_resolution") | col.prop(sculpt, "show_low_resolution") | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(sculpt, "use_deform_only") | col.prop(sculpt, "use_deform_only") | ||||
| class VIEW3D_PT_sculpt_options_unified(Panel, View3DPaintPanel): | |||||
| bl_context = ".sculpt_mode" # dot on purpose (access from topbar) | |||||
| bl_parent_id = "VIEW3D_PT_sculpt_options" | |||||
| bl_label = "Unified Brush" | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| return (context.sculpt_object and context.tool_settings.sculpt) | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.use_property_split = True | |||||
| layout.use_property_decorate = False | |||||
| self.unified_paint_settings(layout, context) | |||||
| class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel): | class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel): | ||||
| bl_context = ".sculpt_mode" # dot on purpose (access from topbar) | bl_context = ".sculpt_mode" # dot on purpose (access from topbar) | ||||
| bl_parent_id = "VIEW3D_PT_sculpt_options" | bl_parent_id = "VIEW3D_PT_sculpt_options" | ||||
| bl_label = "Gravity" | bl_label = "Gravity" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.sculpt_object and context.tool_settings.sculpt) | return (context.sculpt_object and context.tool_settings.sculpt) | ||||
| ▲ Show 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | |||||
| class VIEW3D_PT_tools_weightpaint_symmetry_for_topbar(Panel): | class VIEW3D_PT_tools_weightpaint_symmetry_for_topbar(Panel): | ||||
| bl_space_type = 'TOPBAR' | bl_space_type = 'TOPBAR' | ||||
| bl_region_type = 'HEADER' | bl_region_type = 'HEADER' | ||||
| bl_label = "Symmetry" | bl_label = "Symmetry" | ||||
| draw = VIEW3D_PT_tools_weightpaint_symmetry.draw | draw = VIEW3D_PT_tools_weightpaint_symmetry.draw | ||||
| def weight_paint_options(layout, context): | |||||
| # TODO, move to space_view3d.py | |||||
| class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel): | |||||
| bl_context = ".weightpaint" | |||||
| bl_label = "Options" | |||||
| bl_options = {'DEFAULT_CLOSED'} | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.use_property_split = True | |||||
| layout.use_property_decorate = False | |||||
| tool_settings = context.tool_settings | tool_settings = context.tool_settings | ||||
| wpaint = tool_settings.weight_paint | wpaint = tool_settings.weight_paint | ||||
| col = layout.column() | layout.prop(tool_settings, "use_auto_normalize", text="Auto Normalize") | ||||
| col.prop(wpaint, "use_group_restrict") | layout.prop(tool_settings, "use_multipaint", text="Multi-Paint") | ||||
| layout.prop(wpaint, "use_group_restrict") | |||||
| obj = context.weight_paint_object | obj = context.weight_paint_object | ||||
| if obj.type == 'MESH': | if obj.type == 'MESH': | ||||
| mesh = obj.data | mesh = obj.data | ||||
| col.prop(mesh, "use_mirror_x") | layout.prop(mesh, "use_mirror_x") | ||||
| row = col.row() | row = layout.row() | ||||
| row.active = mesh.use_mirror_x | row.active = mesh.use_mirror_x | ||||
| row.prop(mesh, "use_mirror_topology") | row.prop(mesh, "use_mirror_topology") | ||||
| # TODO, move to space_view3d.py | |||||
| class VIEW3D_PT_tools_weightpaint_options_unified(Panel, View3DPaintPanel): | class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel): | ||||
| bl_context = ".weightpaint" | bl_context = ".weightpaint" | ||||
| bl_label = "Unified Brush" | bl_label = "Options" | ||||
| bl_parent_id = "VIEW3D_PT_tools_weightpaint_options" | bl_options = {'DEFAULT_CLOSED'} | ||||
| 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 | ||||
| self.unified_paint_settings(layout, context) | col = layout.column() | ||||
| weight_paint_options(col, context) | |||||
| # ********** default tools for vertex-paint **************** | # ********** default tools for vertex-paint **************** | ||||
| # TODO, move to space_view3d.py | # TODO, move to space_view3d.py | ||||
| class VIEW3D_PT_tools_vertexpaint_options(Panel, View3DPaintPanel): | class VIEW3D_PT_tools_vertexpaint_options(Panel, View3DPaintPanel): | ||||
| bl_context = ".vertexpaint" # dot on purpose (access from topbar) | bl_context = ".vertexpaint" # dot on purpose (access from topbar) | ||||
| bl_label = "Options" | bl_label = "Options" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| @classmethod | |||||
| def poll(self, context): | |||||
| # This is currently unused, since there aren't any Vertex Paint mode specific options. | |||||
| return False | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.label(text="Unified Brush") | |||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| layout.use_property_decorate = False | layout.use_property_decorate = False | ||||
| self.unified_paint_settings(layout, context) | |||||
| # TODO, move to space_view3d.py | # TODO, move to space_view3d.py | ||||
| class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel): | class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel): | ||||
| bl_context = ".vertexpaint" # dot on purpose (access from topbar) | bl_context = ".vertexpaint" # dot on purpose (access from topbar) | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| bl_label = "Symmetry" | bl_label = "Symmetry" | ||||
| @classmethod | @classmethod | ||||
| ▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) | flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(ipaint, "use_occlude") | col.prop(ipaint, "use_occlude") | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(ipaint, "use_backface_culling", text="Backface Culling") | col.prop(ipaint, "use_backface_culling", text="Backface Culling") | ||||
| class VIEW3D_PT_tools_imagepaint_options_unified(Panel, View3DPaintPanel): | |||||
| bl_context = ".imagepaint" # dot on purpose (access from topbar) | |||||
| bl_parent_id = "VIEW3D_PT_tools_imagepaint_options" | |||||
| bl_label = "Unified Brush" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.use_property_split = True | |||||
| layout.use_property_decorate = False | |||||
| self.unified_paint_settings(layout, context) | |||||
| class VIEW3D_PT_tools_imagepaint_options_cavity(View3DPaintPanel, Panel): | class VIEW3D_PT_tools_imagepaint_options_cavity(View3DPaintPanel, Panel): | ||||
| bl_context = ".imagepaint" # dot on purpose (access from topbar) | bl_context = ".imagepaint" # dot on purpose (access from topbar) | ||||
| bl_label = "Cavity Mask" | bl_label = "Cavity Mask" | ||||
| bl_parent_id = "VIEW3D_PT_tools_imagepaint_options" | bl_parent_id = "VIEW3D_PT_tools_imagepaint_options" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| tool_settings = context.tool_settings | tool_settings = context.tool_settings | ||||
| ipaint = tool_settings.image_paint | ipaint = tool_settings.image_paint | ||||
| self.layout.prop(ipaint, "use_cavity", text="") | self.layout.prop(ipaint, "use_cavity", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| tool_settings = context.tool_settings | tool_settings = context.tool_settings | ||||
| ipaint = tool_settings.image_paint | ipaint = tool_settings.image_paint | ||||
| layout.active = ipaint.use_cavity | layout.active = ipaint.use_cavity | ||||
| layout.template_curve_mapping(ipaint, "cavity_curve", brush=True, | layout.template_curve_mapping(ipaint, "cavity_curve", brush=True, | ||||
| use_negative_slope=True) | use_negative_slope=True) | ||||
| # TODO, move to space_view3d.py | |||||
| class VIEW3D_PT_imagepaint_options(View3DPaintPanel): | |||||
| bl_label = "Options" | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| return (context.image_paint_object and context.tool_settings.image_paint) | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| col = layout.column() | |||||
| self.unified_paint_settings(col, context) | |||||
| class VIEW3D_MT_tools_projectpaint_stencil(Menu): | class VIEW3D_MT_tools_projectpaint_stencil(Menu): | ||||
| bl_label = "Mask Layer" | bl_label = "Mask Layer" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| for i, uv_layer in enumerate(context.active_object.data.uv_layers): | for i, uv_layer in enumerate(context.active_object.data.uv_layers): | ||||
| props = layout.operator("wm.context_set_int", text=uv_layer.name, translate=False) | props = layout.operator("wm.context_set_int", text=uv_layer.name, translate=False) | ||||
| props.data_path = "active_object.data.uv_layer_stencil_index" | props.data_path = "active_object.data.uv_layer_stencil_index" | ||||
| ▲ Show 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| row_mat.template_ID(gp_settings, "material", live_icon=True) | row_mat.template_ID(gp_settings, "material", live_icon=True) | ||||
| else: | else: | ||||
| row_mat.template_ID(context.active_object, "active_material", live_icon=True) | row_mat.template_ID(context.active_object, "active_material", live_icon=True) | ||||
| row_mat.enabled = False # will otherwise allow to change material in active slot | row_mat.enabled = False # will otherwise allow to change material in active slot | ||||
| row.prop(gp_settings, "use_material_pin", text="") | row.prop(gp_settings, "use_material_pin", text="") | ||||
| if not self.is_popover: | if not self.is_popover: | ||||
| from bl_ui.properties_paint_common import ( | |||||
| brush_basic_gpencil_paint_settings, | |||||
| ) | |||||
| brush_basic_gpencil_paint_settings(layout, context, brush, compact=True) | brush_basic_gpencil_paint_settings(layout, context, brush, compact=True) | ||||
| # Grease Pencil drawing brushes options | # Grease Pencil drawing brushes options | ||||
| class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel): | class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel): | ||||
| bl_context = ".greasepencil_paint" | bl_context = ".greasepencil_paint" | ||||
| bl_label = "Options" | bl_label = "Options" | ||||
| bl_category = "Tool" | bl_category = "Tool" | ||||
| ▲ Show 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | class VIEW3D_PT_tools_grease_pencil_weight_paint(View3DPanel, Panel): | ||||
| bl_category = "Tools" | bl_category = "Tools" | ||||
| bl_label = "Brush" | bl_label = "Brush" | ||||
| bl_category = "Tool" | bl_category = "Tool" | ||||
| 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 | ||||
Done Inline Actionstabs on empty lines are bad! ;) Lots of those here, to be fixed. mont29: tabs on empty lines are bad! ;)
Lots of those here, to be fixed. | |||||
| settings = context.tool_settings.gpencil_sculpt | settings = context.tool_settings.gpencil_sculpt | ||||
| brush = settings.brush | brush = settings.brush | ||||
| layout.template_icon_view(settings, "weight_tool", show_labels=True) | layout.template_icon_view(settings, "weight_tool", show_labels=True) | ||||
| col = layout.column() | col = layout.column() | ||||
| if not self.is_popover: | if not self.is_popover: | ||||
| from bl_ui.properties_paint_common import ( | |||||
| brush_basic_gpencil_weight_settings, | |||||
| ) | |||||
| brush_basic_gpencil_weight_settings(col, context, brush) | brush_basic_gpencil_weight_settings(col, context, brush) | ||||
| # Grease Pencil Brush Appearance (one for each mode) | # Grease Pencil Brush Appearance (one for each mode) | ||||
| class VIEW3D_PT_tools_grease_pencil_paint_appearance(GreasePencilAppearancePanel, View3DPanel, Panel): | class VIEW3D_PT_tools_grease_pencil_paint_appearance(GreasePencilAppearancePanel, View3DPanel, Panel): | ||||
| bl_context = ".greasepencil_paint" | bl_context = ".greasepencil_paint" | ||||
| bl_label = "Display" | bl_label = "Display" | ||||
| bl_category = "Tool" | bl_category = "Tool" | ||||
| Show All 33 Lines | classes = ( | ||||
| VIEW3D_PT_tools_object_options_transform, | VIEW3D_PT_tools_object_options_transform, | ||||
| VIEW3D_PT_tools_meshedit_options, | VIEW3D_PT_tools_meshedit_options, | ||||
| VIEW3D_PT_tools_meshedit_options_automerge, | VIEW3D_PT_tools_meshedit_options_automerge, | ||||
| VIEW3D_PT_tools_curveedit_options_stroke, | VIEW3D_PT_tools_curveedit_options_stroke, | ||||
| VIEW3D_PT_tools_armatureedit_options, | VIEW3D_PT_tools_armatureedit_options, | ||||
| VIEW3D_PT_tools_posemode_options, | VIEW3D_PT_tools_posemode_options, | ||||
| VIEW3D_PT_slots_projectpaint, | VIEW3D_PT_slots_projectpaint, | ||||
| VIEW3D_PT_tools_brush, | VIEW3D_PT_tools_brush, | ||||
| VIEW3D_PT_tools_brush_color, | |||||
| VIEW3D_PT_tools_brush_swatches, | VIEW3D_PT_tools_brush_swatches, | ||||
| VIEW3D_PT_tools_brush_clone, | VIEW3D_PT_tools_brush_clone, | ||||
| VIEW3D_PT_tools_brush_options, | |||||
| TEXTURE_UL_texpaintslots, | TEXTURE_UL_texpaintslots, | ||||
| VIEW3D_MT_tools_projectpaint_uvlayer, | VIEW3D_MT_tools_projectpaint_uvlayer, | ||||
| VIEW3D_PT_stencil_projectpaint, | VIEW3D_PT_stencil_projectpaint, | ||||
| VIEW3D_PT_tools_brush_texture, | VIEW3D_PT_tools_brush_texture, | ||||
| VIEW3D_PT_tools_mask_texture, | VIEW3D_PT_tools_mask_texture, | ||||
| VIEW3D_PT_tools_brush_stroke, | VIEW3D_PT_tools_brush_stroke, | ||||
| VIEW3D_PT_tools_brush_stroke_smooth_stroke, | VIEW3D_PT_tools_brush_stroke_smooth_stroke, | ||||
| VIEW3D_PT_tools_brush_falloff, | VIEW3D_PT_tools_brush_falloff, | ||||
| VIEW3D_PT_tools_brush_falloff_frontface, | VIEW3D_PT_tools_brush_falloff_frontface, | ||||
| VIEW3D_PT_tools_brush_falloff_normal, | VIEW3D_PT_tools_brush_falloff_normal, | ||||
| VIEW3D_PT_tools_brush_display, | VIEW3D_PT_tools_brush_display, | ||||
| VIEW3D_PT_tools_brush_display_show_brush, | VIEW3D_PT_tools_brush_display_show_brush, | ||||
| VIEW3D_PT_tools_brush_display_custom_icon, | VIEW3D_PT_tools_brush_display_custom_icon, | ||||
| VIEW3D_PT_sculpt_dyntopo, | VIEW3D_PT_sculpt_dyntopo, | ||||
| VIEW3D_PT_sculpt_dyntopo_remesh, | VIEW3D_PT_sculpt_dyntopo_remesh, | ||||
| VIEW3D_PT_sculpt_voxel_remesh, | VIEW3D_PT_sculpt_voxel_remesh, | ||||
| VIEW3D_PT_sculpt_symmetry, | VIEW3D_PT_sculpt_symmetry, | ||||
| VIEW3D_PT_sculpt_symmetry_for_topbar, | VIEW3D_PT_sculpt_symmetry_for_topbar, | ||||
| VIEW3D_PT_sculpt_options, | VIEW3D_PT_sculpt_options, | ||||
| VIEW3D_PT_sculpt_options_unified, | |||||
| VIEW3D_PT_sculpt_options_gravity, | VIEW3D_PT_sculpt_options_gravity, | ||||
| VIEW3D_PT_tools_weightpaint_symmetry, | VIEW3D_PT_tools_weightpaint_symmetry, | ||||
| VIEW3D_PT_tools_weightpaint_symmetry_for_topbar, | VIEW3D_PT_tools_weightpaint_symmetry_for_topbar, | ||||
| VIEW3D_PT_tools_weightpaint_options, | VIEW3D_PT_tools_weightpaint_options, | ||||
| VIEW3D_PT_tools_weightpaint_options_unified, | |||||
| VIEW3D_PT_tools_vertexpaint_symmetry, | VIEW3D_PT_tools_vertexpaint_symmetry, | ||||
| VIEW3D_PT_tools_vertexpaint_symmetry_for_topbar, | VIEW3D_PT_tools_vertexpaint_symmetry_for_topbar, | ||||
| VIEW3D_PT_tools_vertexpaint_options, | VIEW3D_PT_tools_vertexpaint_options, | ||||
| VIEW3D_PT_tools_imagepaint_symmetry, | VIEW3D_PT_tools_imagepaint_symmetry, | ||||
| VIEW3D_PT_tools_imagepaint_options, | VIEW3D_PT_tools_imagepaint_options, | ||||
| VIEW3D_PT_tools_imagepaint_options_cavity, | VIEW3D_PT_tools_imagepaint_options_cavity, | ||||
| VIEW3D_PT_tools_imagepaint_options_unified, | |||||
| VIEW3D_PT_tools_imagepaint_options_external, | VIEW3D_PT_tools_imagepaint_options_external, | ||||
| VIEW3D_MT_tools_projectpaint_stencil, | VIEW3D_MT_tools_projectpaint_stencil, | ||||
| VIEW3D_PT_tools_particlemode, | VIEW3D_PT_tools_particlemode, | ||||
| VIEW3D_PT_tools_particlemode_options, | VIEW3D_PT_tools_particlemode_options, | ||||
| VIEW3D_PT_tools_particlemode_options_shapecut, | VIEW3D_PT_tools_particlemode_options_shapecut, | ||||
| VIEW3D_PT_tools_particlemode_options_display, | VIEW3D_PT_tools_particlemode_options_display, | ||||
| VIEW3D_PT_gpencil_brush_presets, | VIEW3D_PT_gpencil_brush_presets, | ||||
| Show All 22 Lines | |||||
This property is missing in the patch