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>2020-03-04 02:56:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-04 03:05:08 +0300
commita37dceb139eb64e00af8c1a79c49f31f42479bdd (patch)
treef5cf0c3cff1bbf295d03257d3817bc2b8809eb52 /source/blender/editors/object/object_remesh.c
parenta5c984a57d5fef45677876af15bff39632e5f552 (diff)
Cleanup: replace commented code with define check
Avoids duplicated comments, also quiet warning accessing non-existing variable.
Diffstat (limited to 'source/blender/editors/object/object_remesh.c')
-rw-r--r--source/blender/editors/object/object_remesh.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c
index 742c9c77542..4454af5a096 100644
--- a/source/blender/editors/object/object_remesh.c
+++ b/source/blender/editors/object/object_remesh.c
@@ -74,6 +74,9 @@
#include "object_intern.h" // own include
+/* TODO(sebpa): unstable, can lead to unrecoverable errors. */
+// #define USE_MESH_CURVATURE
+
static bool object_remesh_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@@ -405,8 +408,12 @@ static void quadriflow_start_job(void *customdata, short *stop, short *do_update
qj->target_faces,
qj->seed,
qj->use_preserve_sharp,
- qj->use_preserve_boundary || qj->use_paint_symmetry,
- false, // TODO unstable, can lead to uncoverable errors (sebpa) qj->use_mesh_curvature,
+ (qj->use_preserve_boundary || qj->use_paint_symmetry),
+#ifdef USE_MESH_CURVATURE
+ qj->use_mesh_curvature,
+#else
+ false,
+#endif
quadriflow_update_job,
(void *)qj);
@@ -416,7 +423,7 @@ static void quadriflow_start_job(void *customdata, short *stop, short *do_update
*do_update = true;
*stop = 0;
if (qj->success == 1) {
- /* This is not a user cancelation event */
+ /* This is not a user cancellation event. */
qj->success = 0;
}
return;
@@ -497,7 +504,9 @@ static int quadriflow_remesh_exec(bContext *C, wmOperator *op)
job->use_preserve_sharp = RNA_boolean_get(op->ptr, "use_preserve_sharp");
job->use_preserve_boundary = RNA_boolean_get(op->ptr, "use_preserve_boundary");
+#ifdef USE_MESH_CURVATURE
job->use_mesh_curvature = RNA_boolean_get(op->ptr, "use_mesh_curvature");
+#endif
job->preserve_paint_mask = RNA_boolean_get(op->ptr, "preserve_paint_mask");
job->smooth_normals = RNA_boolean_get(op->ptr, "smooth_normals");
@@ -671,13 +680,13 @@ void OBJECT_OT_quadriflow_remesh(wmOperatorType *ot)
false,
"Preserve Mesh Boundary",
"Try to preserve mesh boundary on the mesh");
- /* TODO unstable, can lead to uncoverable errors (sebpa)
+#ifdef USE_MESH_CURVATURE
RNA_def_boolean(ot->srna,
"use_mesh_curvature",
false,
"Use Mesh Curvature",
"Take the mesh curvature into account when remeshing");
- */
+#endif
RNA_def_boolean(ot->srna,
"preserve_paint_mask",
false,