Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py121
1 files changed, 40 insertions, 81 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 5171a6dd47d..52658411fb0 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel
-from .properties_paint_common import UnifiedPaintPanel
+from bl_ui.properties_paint_common import UnifiedPaintPanel
class View3DPanel():
@@ -144,7 +144,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="Remove:")
- col.operator("mesh.delete")
+ col.menu("VIEW3D_MT_edit_mesh_delete")
col.operator("mesh.merge")
col.operator("mesh.remove_doubles")
@@ -198,6 +198,8 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
col.label("Edge Select Mode:")
col.prop(tool_settings, "edge_path_mode", text="")
col.prop(tool_settings, "edge_path_live_unwrap")
+ col.label("Double Threshold:")
+ col.prop(tool_settings, "double_threshold", text="")
# ********** default tools for editmode_curve ****************
@@ -500,7 +502,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# Sculpt Mode #
elif context.sculpt_object and brush:
- tool = brush.sculpt_tool
+ capabilities = brush.sculpt_capabilities
col = layout.column()
@@ -519,47 +521,43 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_size(row, context, brush, "use_pressure_size")
- if tool not in {'SNAKE_HOOK', 'GRAB', 'ROTATE'}:
+ # strength, use_strength_pressure, and use_strength_attenuation
+ if capabilities.has_strength:
col.separator()
-
row = col.row(align=True)
- if brush.use_space and tool != 'SMOOTH':
- if brush.use_space_atten:
- row.prop(brush, "use_space_atten", toggle=True, text="", icon='LOCKED')
+ if capabilities.has_space_attenuation:
+ if brush.use_space_attenuation:
+ row.prop(brush, "use_space_attenuation", toggle=True, text="", icon='LOCKED')
else:
- row.prop(brush, "use_space_atten", toggle=True, text="", icon='UNLOCKED')
-
- self.prop_unified_strength(row, context, brush, "strength", text="Strength")
- self.prop_unified_strength(row, context, brush, "use_pressure_strength")
+ row.prop(brush, "use_space_attenuation", toggle=True, text="", icon='UNLOCKED')
- if tool == 'ROTATE':
- row = col.row(align=True)
self.prop_unified_strength(row, context, brush, "strength", text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
- if tool != 'SMOOTH':
+ # auto_smooth_factor and use_inverse_smooth_pressure
+ if capabilities.has_auto_smooth:
col.separator()
row = col.row(align=True)
row.prop(brush, "auto_smooth_factor", slider=True)
row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
- if tool in {'GRAB', 'SNAKE_HOOK'}:
+ # normal_weight
+ if capabilities.has_normal_weight:
col.separator()
-
row = col.row(align=True)
row.prop(brush, "normal_weight", slider=True)
- if tool in {'CREASE', 'BLOB'}:
+ # crease_pinch_factor
+ if capabilities.has_pinch_factor:
col.separator()
-
row = col.row(align=True)
row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
- if tool not in {'PINCH', 'INFLATE', 'SMOOTH'}:
+ # use_original_normal and sculpt_plane
+ if capabilities.has_sculpt_plane:
row = col.row(align=True)
-
col.separator()
if brush.use_original_normal:
@@ -569,8 +567,8 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
row.prop(brush, "sculpt_plane", text="")
- #if tool in {'CLAY', 'CLAY_TUBES', 'FLATTEN', 'FILL', 'SCRAPE'}:
- if tool in {'CLAY', 'FLATTEN', 'FILL', 'SCRAPE'}:
+ # 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="")
@@ -583,24 +581,28 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
row.active = brush.use_plane_trim
row.prop(brush, "plane_trim", slider=True, text="Distance")
- if tool == 'LAYER':
+ # height
+ if capabilities.has_height:
row = col.row()
row.prop(brush, "height", slider=True, text="Height")
+ # use_frontface
col.separator()
-
row = col.row()
row.prop(brush, "use_frontface", text="Front Faces Only")
+ # direction
col.separator()
col.row().prop(brush, "direction", expand=True)
- if tool in {'DRAW', 'CREASE', 'BLOB', 'INFLATE', 'LAYER', 'CLAY'}:
+ # use_accumulate
+ if capabilities.has_accumulate:
col.separator()
col.prop(brush, "use_accumulate")
- if tool == 'LAYER':
+ # use_persistent, set_persistent_base
+ if capabilities.has_persistence:
col.separator()
ob = context.sculpt_object
@@ -714,7 +716,7 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
col = layout.column()
col.active = tex_slot.map_mode in {'FIXED'}
col.label(text="Angle:")
- if not brush.use_anchor and brush.sculpt_tool not in {'GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE'} and tex_slot.map_mode in {'FIXED'}:
+ if brush.sculpt_capabilities.has_random_texture_angle:
col.prop(brush, "texture_angle_source_random", text="")
else:
col.prop(brush, "texture_angle_source_no_random", text="")
@@ -733,10 +735,6 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
col.active = tex_slot.map_mode in {'FIXED', 'TILED'}
col.prop(tex_slot, "angle", text="")
- #col = layout.column()
- #col.prop(brush, "use_random_rotation")
- #col.active = (not brush.use_rake) and (not brush.use_anchor) and (brush.sculpt_tool not in {'GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE'}) and tex_slot.map_mode in {'FIXED'}
-
split = layout.split()
split.prop(tex_slot, "offset")
split.prop(tex_slot, "scale")
@@ -759,40 +757,6 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
-class VIEW3D_PT_tools_brush_tool(Panel, View3DPaintPanel):
- bl_label = "Tool"
- bl_options = {'DEFAULT_CLOSED'}
-
- @classmethod
- def poll(cls, context):
- settings = cls.paint_settings(context)
- return (settings and settings.brush and
- (context.sculpt_object or context.image_paint_object or
- context.vertex_paint_object or context.weight_paint_object))
-
- def draw(self, context):
- layout = self.layout
-
- settings = self.paint_settings(context)
- brush = settings.brush
-
- col = layout.column(align=True)
-
- if context.sculpt_object:
- col.prop(brush, "sculpt_tool", expand=False, text="")
- col.operator("brush.reset")
- elif context.image_paint_object:
- col.prop(brush, "image_tool", expand=False, text="")
- elif context.vertex_paint_object or context.weight_paint_object:
- col.prop(brush, "vertex_tool", expand=False, text="")
-
- row = layout.row(align=True)
- row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
- row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
- row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
- row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
-
-
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
bl_label = "Stroke"
bl_options = {'DEFAULT_CLOSED'}
@@ -832,7 +796,7 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
row.active = brush.use_space
row.prop(brush, "spacing", text="Spacing")
- if (brush.sculpt_tool not in {'GRAB', 'THUMB', 'SNAKE_HOOK', 'ROTATE'}) and (not brush.use_anchor) and (not brush.use_restore_mesh):
+ if brush.sculpt_capabilities.has_smooth_stroke:
col = layout.column()
col.separator()
@@ -843,6 +807,7 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+ if brush.sculpt_capabilities.has_jitter:
col.separator()
row = col.row(align=True)
@@ -869,21 +834,13 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
col.separator()
col = layout.column()
- col.active = (not brush.use_anchor) and (brush.sculpt_tool not in {'GRAB', 'THUMB', 'ROTATE', 'SNAKE_HOOK'})
+ col.active = brush.sculpt_capabilities.has_spacing
col.prop(brush, "use_space")
row = col.row()
row.active = brush.use_space
row.prop(brush, "spacing", text="Spacing")
- #col.prop(brush, "use_space_atten", text="Adaptive Strength")
- #col.prop(brush, "use_adaptive_space", text="Adaptive Spacing")
-
- #col.separator()
-
- #if image_paint:
- # row.prop(brush, "use_pressure_spacing", toggle=True, text="")
-
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
bl_label = "Curve"
@@ -989,8 +946,7 @@ class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
col = layout.column()
if context.sculpt_object and context.tool_settings.sculpt:
- #if brush.sculpt_tool in {'DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE', 'CLAY_TUBES'}:
- if brush.sculpt_tool in {'DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE'}:
+ if brush.sculpt_capabilities.has_secondary_color:
col.prop(brush, "cursor_color_add", text="Add Color")
col.prop(brush, "cursor_color_subtract", text="Subtract Color")
else:
@@ -1023,6 +979,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
col.operator("object.vertex_group_invert", text="Invert")
col.operator("object.vertex_group_clean", text="Clean")
col.operator("object.vertex_group_levels", text="Levels")
+ col.operator("object.vertex_group_blend", text="Blend")
col.operator("object.vertex_group_fix", text="Fix Deforms")
@@ -1133,13 +1090,15 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
row = split.row()
row.active = (ipaint.use_stencil_layer)
- row.menu("VIEW3D_MT_tools_projectpaint_stencil", text=mesh.uv_texture_stencil.name)
+ stencil_text = mesh.uv_texture_stencil.name if mesh.uv_texture_stencil else ""
+ row.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text)
row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
row = layout.row()
row.active = (settings.brush.image_tool == 'CLONE')
- row.prop(ipaint, "use_clone_layer", text="Layer")
- row.menu("VIEW3D_MT_tools_projectpaint_clone", text=mesh.uv_texture_clone.name)
+ row.prop(ipaint, "use_clone_layer", text="Clone")
+ clone_text = mesh.uv_texture_clone.name if mesh.uv_texture_clone else ""
+ row.menu("VIEW3D_MT_tools_projectpaint_clone", text=clone_text)
layout.prop(ipaint, "seam_bleed")