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.py214
1 files changed, 172 insertions, 42 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3eb76a3b0f9..dedad63833a 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -22,6 +22,7 @@ from bpy.types import Menu, Panel, UIList
from bl_ui.properties_grease_pencil_common import (
GreasePencilDrawingToolsPanel,
GreasePencilStrokeEditPanel,
+ GreasePencilInterpolatePanel,
GreasePencilStrokeSculptPanel,
GreasePencilBrushPanel,
GreasePencilBrushCurvesPanel
@@ -50,6 +51,19 @@ def draw_keyframing_tools(context, layout):
row.operator("anim.keyframe_delete_v3d", text="Remove")
+# Used by vertex & weight paint
+def draw_vpaint_symmetry(layout, vpaint):
+ col = layout.column(align=True)
+ col.label(text="Mirror:")
+ row = col.row(align=True)
+
+ row.prop(vpaint, "use_symmetry_x", text="X", toggle=True)
+ row.prop(vpaint, "use_symmetry_y", text="Y", toggle=True)
+ row.prop(vpaint, "use_symmetry_z", text="Z", toggle=True)
+
+ col = layout.column()
+ col.prop(vpaint, "radial_symmetry", text="Radial")
+
# ********** default tools for object-mode ****************
@@ -915,16 +929,18 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
col.separator()
col.label("Missing Canvas", icon='INFO')
col.label("Add or assign a canvas image below")
- col.label("Canvas Image")
- col.template_ID(toolsettings, "canvas")
+ col.label("Canvas Image:")
+ # todo this should be combinded into a single row
+ col.template_ID(toolsettings, "canvas", open="image.open")
col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS'
if toolsettings.missing_stencil:
col.separator()
col.label("Missing Stencil", icon='INFO')
col.label("Add or assign a stencil image below")
- col.label("Stencil Image")
- col.template_ID(toolsettings, "stencil_image")
+ col.label("Stencil Image:")
+ # todo this should be combinded into a single row
+ col.template_ID(toolsettings, "stencil_image", open="image.open")
col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
@@ -966,9 +982,9 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col.prop(brush, "steps", slider=True)
col.prop(settings, "default_key_count", slider=True)
elif tool == 'LENGTH':
- layout.prop(brush, "length_mode", expand=True)
+ layout.row().prop(brush, "length_mode", expand=True)
elif tool == 'PUFF':
- layout.prop(brush, "puff_mode", expand=True)
+ layout.row().prop(brush, "puff_mode", expand=True)
layout.prop(brush, "use_puff_volume")
# Sculpt Mode #
@@ -1064,8 +1080,8 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# use_frontface
col.separator()
- row = col.row()
- row.prop(brush, "use_frontface", text="Front Faces Only")
+ col.prop(brush, "use_frontface", text="Front Faces Only")
+ col.prop(brush, "use_projected")
# direction
col.separator()
@@ -1115,12 +1131,22 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "strength", text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
+ col.separator()
col.prop(brush, "vertex_tool", text="Blend")
- if brush.vertex_tool == 'BLUR':
+ if brush.vertex_tool != 'SMEAR':
col.prop(brush, "use_accumulate")
col.separator()
+ col.prop(brush, "use_frontface", text="Front Faces Only")
+ row = col.row()
+ row.prop(brush, "use_frontface_falloff", text="Falloff Angle")
+ sub = row.row()
+ sub.active = brush.use_frontface_falloff
+ sub.prop(brush, "falloff_angle", text="")
+
+ col.prop(brush, "use_projected")
+
col = layout.column()
col.prop(toolsettings, "use_auto_normalize", text="Auto Normalize")
col.prop(toolsettings, "use_multipaint", text="Multi-Paint")
@@ -1131,7 +1157,11 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_color_picker(col, context, brush, "color", value_slider=True)
if settings.palette:
col.template_palette(settings, "palette", color=True)
- self.prop_unified_color(col, context, brush, "color", text="")
+ row = col.row(align=True)
+ self.prop_unified_color(row, context, brush, "color", text="")
+ self.prop_unified_color(row, context, brush, "secondary_color", text="")
+ row.separator()
+ row.operator("paint.brush_colors_flip", icon='FILE_REFRESH', text="")
col.separator()
row = col.row(align=True)
@@ -1142,12 +1172,22 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "strength", text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
- # XXX - TODO
- # row = col.row(align=True)
- # row.prop(brush, "jitter", slider=True)
- # row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.separator()
col.prop(brush, "vertex_tool", text="Blend")
+ col.prop(brush, "use_alpha")
+
+ if brush.vertex_tool != 'SMEAR':
+ col.prop(brush, "use_accumulate")
+ col.separator()
+
+ col.prop(brush, "use_frontface", text="Front Faces Only")
+ row = col.row()
+ row.prop(brush, "use_frontface_falloff", text="Falloff Angle")
+ sub = row.row()
+ sub.active = brush.use_frontface_falloff
+ sub.prop(brush, "falloff_angle", text="")
+
+ col.prop(brush, "use_projected")
col.separator()
col.template_ID(settings, "palette", new="palette.new")
@@ -1199,20 +1239,20 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
ob = context.active_object
col = layout.column()
- col.label("Painting Mode")
+ col.label("Painting Mode:")
col.prop(settings, "mode", text="")
col.separator()
if settings.mode == 'MATERIAL':
if len(ob.material_slots) > 1:
- col.label("Materials")
+ col.label("Materials:")
col.template_list("MATERIAL_UL_matslots", "layers",
ob, "material_slots",
ob, "active_material_index", rows=2)
mat = ob.active_material
if mat:
- col.label("Available Paint Slots")
+ col.label("Available Paint Slots:")
col.template_list("TEXTURE_UL_texpaintslots", "",
mat, "texture_paint_images",
mat, "paint_active_slot", rows=2)
@@ -1232,16 +1272,17 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
col.separator()
if slot and slot.index != -1:
- col.label("UV Map")
+ col.label("UV Map:")
col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="")
elif settings.mode == 'IMAGE':
mesh = ob.data
uv_text = mesh.uv_textures.active.name if mesh.uv_textures.active else ""
- col.label("Canvas Image")
- col.template_ID(settings, "canvas")
+ col.label("Canvas Image:")
+ # todo this should be combinded into a single row
+ col.template_ID(settings, "canvas", open="image.open")
col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS'
- col.label("UV Map")
+ col.label("UV Map:")
col.menu("VIEW3D_MT_tools_projectpaint_uvlayer", text=uv_text, translate=False)
col.separator()
@@ -1275,14 +1316,15 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
col.active = ipaint.use_stencil_layer
stencil_text = mesh.uv_texture_stencil.name if mesh.uv_texture_stencil else ""
- col.label("UV Map")
+ col.label("UV Map:")
col.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
- col.label("Stencil Image")
- col.template_ID(ipaint, "stencil_image")
+ col.label("Stencil Image:")
+ # todo this should be combinded into a single row
+ col.template_ID(ipaint, "stencil_image", open="image.open")
col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
- col.label("Visualization")
+ col.label("Visualization:")
row = col.row(align=True)
row.prop(ipaint, "stencil_color", text="")
row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
@@ -1712,6 +1754,19 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
props.data_type = 'VGROUP_WEIGHTS'
+class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel):
+ bl_category = "Tools"
+ bl_context = "weightpaint"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_label = "Symmetry"
+
+ def draw(self, context):
+ layout = self.layout
+ toolsettings = context.tool_settings
+ wpaint = toolsettings.weight_paint
+ draw_vpaint_symmetry(layout, wpaint)
+
+
class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
bl_category = "Options"
bl_context = "weightpaint"
@@ -1724,13 +1779,7 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
wpaint = tool_settings.weight_paint
col = layout.column()
- row = col.row()
-
- row.prop(wpaint, "use_normal")
- col = layout.column()
- row = col.row()
- row.prop(wpaint, "use_spray")
- row.prop(wpaint, "use_group_restrict")
+ col.prop(wpaint, "use_group_restrict")
obj = context.weight_paint_object
if obj.type == 'MESH':
@@ -1761,18 +1810,28 @@ class VIEW3D_PT_tools_vertexpaint(Panel, View3DPaintPanel):
vpaint = toolsettings.vertex_paint
col = layout.column()
+ col.label("Falloff:")
row = col.row()
- # col.prop(vpaint, "mode", text="")
- row.prop(vpaint, "use_normal")
- col.prop(vpaint, "use_spray")
+ row.prop(vpaint, "use_normal_falloff")
+ sub = row.row()
+ sub.active = (vpaint.use_normal_falloff)
+ sub.prop(vpaint, "normal_angle", text="")
self.unified_paint_settings(col, context)
-# Commented out because the Apply button isn't an operator yet, making these settings useless
-#~ col.label(text="Gamma:")
-#~ col.prop(vpaint, "gamma", text="")
-#~ col.label(text="Multiply:")
-#~ col.prop(vpaint, "mul", text="")
+
+class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel):
+ bl_category = "Tools"
+ bl_context = "vertexpaint"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_label = "Symmetry"
+
+ def draw(self, context):
+ layout = self.layout
+ toolsettings = context.tool_settings
+ vpaint = toolsettings.vertex_paint
+ draw_vpaint_symmetry(layout, vpaint)
+
# ********** default tools for texture-paint ****************
@@ -1920,7 +1979,7 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
col = layout.column(align=True)
if pe.is_hair:
col.active = pe.is_editable
- col.prop(pe, "use_emitter_deflect", text="Deflect emitter")
+ col.prop(pe, "use_emitter_deflect", text="Deflect Emitter")
sub = col.row(align=True)
sub.active = pe.use_emitter_deflect
sub.prop(pe, "emitter_distance", text="Distance")
@@ -1963,6 +2022,11 @@ class VIEW3D_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
bl_space_type = 'VIEW_3D'
+# Grease Pencil stroke interpolation tools
+class VIEW3D_PT_tools_grease_pencil_interpolate(GreasePencilInterpolatePanel, Panel):
+ bl_space_type = 'VIEW_3D'
+
+
# Grease Pencil stroke sculpting tools
class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel):
bl_space_type = 'VIEW_3D'
@@ -2002,5 +2066,71 @@ class VIEW3D_PT_tools_history(View3DPanel, Panel):
col.operator("screen.repeat_history", text="History...")
+classes = (
+ VIEW3D_PT_tools_transform,
+ VIEW3D_PT_tools_object,
+ VIEW3D_PT_tools_add_object,
+ VIEW3D_PT_tools_relations,
+ VIEW3D_PT_tools_animation,
+ VIEW3D_PT_tools_rigid_body,
+ VIEW3D_PT_tools_transform_mesh,
+ VIEW3D_PT_tools_meshedit,
+ VIEW3D_PT_tools_meshweight,
+ VIEW3D_PT_tools_add_mesh_edit,
+ VIEW3D_PT_tools_shading,
+ VIEW3D_PT_tools_uvs,
+ VIEW3D_PT_tools_meshedit_options,
+ VIEW3D_PT_tools_transform_curve,
+ VIEW3D_PT_tools_curveedit,
+ VIEW3D_PT_tools_add_curve_edit,
+ VIEW3D_PT_tools_curveedit_options_stroke,
+ VIEW3D_PT_tools_transform_surface,
+ VIEW3D_PT_tools_surfaceedit,
+ VIEW3D_PT_tools_add_surface_edit,
+ VIEW3D_PT_tools_textedit,
+ VIEW3D_PT_tools_armatureedit,
+ VIEW3D_PT_tools_armatureedit_transform,
+ VIEW3D_PT_tools_armatureedit_options,
+ VIEW3D_PT_tools_mballedit,
+ VIEW3D_PT_tools_add_mball_edit,
+ VIEW3D_PT_tools_latticeedit,
+ VIEW3D_PT_tools_posemode,
+ VIEW3D_PT_tools_posemode_options,
+ VIEW3D_PT_imapaint_tools_missing,
+ VIEW3D_PT_tools_brush,
+ TEXTURE_UL_texpaintslots,
+ VIEW3D_MT_tools_projectpaint_uvlayer,
+ VIEW3D_PT_slots_projectpaint,
+ VIEW3D_PT_stencil_projectpaint,
+ VIEW3D_PT_tools_brush_overlay,
+ VIEW3D_PT_tools_brush_texture,
+ VIEW3D_PT_tools_mask_texture,
+ VIEW3D_PT_tools_brush_stroke,
+ VIEW3D_PT_tools_brush_curve,
+ VIEW3D_PT_sculpt_dyntopo,
+ VIEW3D_PT_sculpt_options,
+ VIEW3D_PT_sculpt_symmetry,
+ VIEW3D_PT_tools_brush_appearance,
+ VIEW3D_PT_tools_weightpaint,
+ VIEW3D_PT_tools_weightpaint_symmetry,
+ VIEW3D_PT_tools_weightpaint_options,
+ VIEW3D_PT_tools_vertexpaint,
+ VIEW3D_PT_tools_vertexpaint_symmetry,
+ VIEW3D_PT_tools_imagepaint_external,
+ VIEW3D_PT_tools_imagepaint_symmetry,
+ VIEW3D_PT_tools_projectpaint,
+ VIEW3D_MT_tools_projectpaint_stencil,
+ VIEW3D_PT_tools_particlemode,
+ VIEW3D_PT_tools_grease_pencil_draw,
+ VIEW3D_PT_tools_grease_pencil_edit,
+ VIEW3D_PT_tools_grease_pencil_interpolate,
+ VIEW3D_PT_tools_grease_pencil_sculpt,
+ VIEW3D_PT_tools_grease_pencil_brush,
+ VIEW3D_PT_tools_grease_pencil_brushcurves,
+ VIEW3D_PT_tools_history,
+)
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)