diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-27 18:38:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-27 18:47:37 +0300 |
commit | 4f616c93f7cb8c8c8e038bc0c949c931242971c2 (patch) | |
tree | f696051e640c757ef2fdacce463d04b7ebb32838 /release | |
parent | 2de5e14f53e9a439ae87deb16f816ec71445c1ba (diff) |
Vertex/Weight Paint: Use PBVH for painting
2016 GSOC project by @nathanvollmer, see D2150
- Mirrored painting and radial symmetry, like in sculpt mode.
- Volume based splash prevention,
which avoids painting vertices far away from the 3D brush location.
- Normal based splash prevention,
which avoids painting vertices with normals opposite the normal
at the 3D brush location.
- Blur mode now uses a nearest neighbor average.
- Average mode, which averages the color/weight
of the vertices within the brush
- Smudge mode, which pulls the colors/weights
along the direction of the brush
- RGB^2 color blending, which gives a more accurate
blend between two colors
- multithreading support. (PBVH leaves are painted in parallel.)
- Foreground/background color picker in vertex paint
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index eb1b2e5971d..8562cb419b4 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -51,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 **************** @@ -1134,7 +1147,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) @@ -1717,6 +1734,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" @@ -1779,6 +1809,20 @@ class VIEW3D_PT_tools_vertexpaint(Panel, View3DPaintPanel): #~ 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 **************** @@ -2058,8 +2102,10 @@ classes = ( 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, |