From 6c036a65c9741786deb53191fa77d83e7ffb1be3 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 31 Mar 2020 17:06:17 +0200 Subject: Add Voxel Mode to the Remesh modifier This adds the Voxel Mode to the current remesh modifier. It works exactly the same way as the voxel remesh operator and uses the same properties to control the remeshing. We can exand this with more options in the future (fix poles, reprojection...) Reviewed By: brecht Differential Revision: https://developer.blender.org/D7292 --- .../startup/bl_ui/properties_data_modifier.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_data_modifier.py') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index e5ea1a94945..cbcd6e2b614 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1317,17 +1317,22 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.prop(md, "mode") row = layout.row() - row.prop(md, "octree_depth") - row.prop(md, "scale") + if md.mode == 'VOXEL': + layout.prop(md, "voxel_size") + layout.prop(md, "adaptivity") + else: + row.prop(md, "octree_depth") + row.prop(md, "scale") - if md.mode == 'SHARP': - layout.prop(md, "sharpness") + if md.mode == 'SHARP': + layout.prop(md, "sharpness") + + layout.prop(md, "use_remove_disconnected") + row = layout.row() + row.active = md.use_remove_disconnected + row.prop(md, "threshold") layout.prop(md, "use_smooth_shade") - layout.prop(md, "use_remove_disconnected") - row = layout.row() - row.active = md.use_remove_disconnected - row.prop(md, "threshold") @staticmethod def vertex_weight_mask(layout, ob, md): -- cgit v1.2.3