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-11-26 20:53:38 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-11-27 19:24:40 +0300
commit47645a8db6223ba31b8128db7502f27876a2586b (patch)
tree75ddb061a924a017648dca3315c581f7cda09cf8 /release/scripts/startup/bl_ui
parent9251b077203c763f1be83505ed0a4d1e19dab947 (diff)
Sculpt: Sample Voxel Size
This adds support to the current sculpt sample detail operator to sample a voxel size for the voxel remesher when sculpting on regular meshes. It provides an approximation of a voxel size that is going to preserve the sampled sculpt details after remeshing. It is not going to be 100% accurate in all cases as it relies on having consistent edge length in the whole sculpt, but it saves a lot of time and avoids guessing the voxel size by trying different values. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6251
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 724264fe494..718365ec99d 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1193,7 +1193,8 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}:
row = sub.row(align=True)
row.prop(sculpt, "constant_detail_resolution")
- row.operator("sculpt.sample_detail_size", text="", icon='EYEDROPPER')
+ props = row.operator("sculpt.sample_detail_size", text="", icon='EYEDROPPER')
+ props.mode = 'DYNTOPO'
elif (sculpt.detail_type_method == 'BRUSH'):
sub.prop(sculpt, "detail_percent")
else:
@@ -1252,7 +1253,10 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
col = layout.column()
mesh = context.active_object.data
- col.prop(mesh, "remesh_voxel_size")
+ row = col.row(align=True)
+ row.prop(mesh, "remesh_voxel_size")
+ props = row.operator("sculpt.sample_detail_size", text="", icon='EYEDROPPER')
+ props.mode = 'VOXEL'
col.prop(mesh, "remesh_voxel_adaptivity")
col.prop(mesh, "use_remesh_fix_poles")
col.prop(mesh, "use_remesh_smooth_normals")