Fix assert running remesh with OpenVDB disabled
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user