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:
authorCampbell Barton <ideasman42@gmail.com>2019-11-20 06:50:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-11-20 06:54:50 +0300
commit858bd1d4d0e9d2c09d1814d006e09a213e7a8db9 (patch)
tree29606fa1d15bdae0cfaeaeca2c00aec5b061c121
parent3b16578fb4996a8a34a169c558d1cd36e417a0bb (diff)
Fix assert running remesh with OpenVDB disabled
-rw-r--r--source/blender/editors/object/object_remesh.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c
index 62e8d326c1c..f18b574b582 100644
--- a/source/blender/editors/object/object_remesh.c
+++ b/source/blender/editors/object/object_remesh.c
@@ -113,10 +113,6 @@ static int voxel_remesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if (ob->mode == OB_MODE_SCULPT) {
- ED_sculpt_undo_geometry_begin(ob, op->type->name);
- }
-
float isovalue = 0.0f;
if (mesh->flag & ME_REMESH_REPROJECT_VOLUME) {
isovalue = mesh->remesh_voxel_size * 0.3f;
@@ -126,9 +122,14 @@ static int voxel_remesh_exec(bContext *C, wmOperator *op)
mesh, mesh->remesh_voxel_size, mesh->remesh_voxel_adaptivity, isovalue);
if (!new_mesh) {
+ BKE_report(op->reports, RPT_ERROR, "Voxel remesher failed to create mesh.");
return OPERATOR_CANCELLED;
}
+ if (ob->mode == OB_MODE_SCULPT) {
+ ED_sculpt_undo_geometry_begin(ob, op->type->name);
+ }
+
if (mesh->flag & ME_REMESH_FIX_POLES && mesh->remesh_voxel_adaptivity <= 0.0f) {
new_mesh = BKE_mesh_remesh_voxel_fix_poles(new_mesh);
BKE_mesh_calc_normals(new_mesh);