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:
authorPablo Dobarro <pablodp606@gmail.com>2019-08-14 19:37:46 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-08-14 19:58:19 +0300
commit45a45f7d66211e82a3a3288782ad9523e8fdc516 (patch)
tree98c0b1564c8c9556331d477e16d4c3f0b4c275fa /release/scripts
parent16c28b5a6784dfdc22535cef14961a9a95136a44 (diff)
OpenVDB: Voxel Remesher
The voxel remesher introduces a new workflow for sculpting without any of the limitations of Dyntopo (no geometry errors or performance penalty when blocking shapes). It is also useful for simulations and 3D printing. This commit includes: - Voxel remesh operator, voxel size mesh property and general remesh flags. - Paint mask reprojection. - Geometry undo/redo for sculpt mode. This should support remesh operations as well as future tools that modify the topology of the sculpt in a single step, like trimming tools or mesh insert brushes. - UI changes in the sculpt topbar and the mesh properties pannel. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5407
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py17
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py33
2 files changed, 49 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 63e4d44eada..47c90199031 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -459,6 +459,22 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
col.operator("mesh.vertex_color_add", icon='ADD', text="")
col.operator("mesh.vertex_color_remove", icon='REMOVE', text="")
+class DATA_PT_remesh(MeshButtonsPanel, Panel):
+ bl_label = "Remesh"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ col = layout.column()
+
+ mesh = context.mesh
+ col.prop(mesh, "remesh_voxel_size")
+ col.prop(mesh, "remesh_smooth_normals")
+ col.prop(mesh, "remesh_preserve_paint_mask")
+ col.operator("object.voxel_remesh", text="Voxel Remesh")
+
class DATA_PT_customdata(MeshButtonsPanel, Panel):
bl_label = "Geometry Data"
@@ -512,6 +528,7 @@ classes = (
DATA_PT_normals,
DATA_PT_normals_auto_smooth,
DATA_PT_texture_space,
+ DATA_PT_remesh,
DATA_PT_customdata,
DATA_PT_custom_props_mesh,
)
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index cd18d857242..5246d8fa864 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1139,8 +1139,38 @@ class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel):
col = flow.column()
col.operator("sculpt.detail_flood_fill")
-# TODO, move to space_view3d.py
+class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
+ bl_label = "Remesh"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_ui_units_x = 12
+ @classmethod
+ def poll(cls, context):
+ return (context.sculpt_object and context.tool_settings.sculpt)
+
+ def draw_header(self, context):
+ is_popover = self.is_popover
+ layout = self.layout
+ layout.operator(
+ "object.voxel_remesh",
+ text="",
+ emboss=is_popover,
+ )
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ col = layout.column()
+ mesh = context.active_object.data
+ col.prop(mesh, "remesh_voxel_size")
+ col.prop(mesh, "remesh_smooth_normals")
+ col.prop(mesh, "remesh_preserve_paint_mask")
+ col.operator("object.voxel_remesh", text="Remesh")
+
+# TODO, move to space_view3d.py
class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
@@ -2152,6 +2182,7 @@ classes = (
VIEW3D_PT_sculpt_options,
VIEW3D_PT_sculpt_options_unified,
VIEW3D_PT_sculpt_options_gravity,
+ VIEW3D_PT_sculpt_voxel_remesh,
VIEW3D_PT_tools_weightpaint_symmetry,
VIEW3D_PT_tools_weightpaint_symmetry_for_topbar,
VIEW3D_PT_tools_weightpaint_options,