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:
authorJacques Lucke <jacques@blender.org>2022-07-25 12:42:27 +0300
committerJacques Lucke <jacques@blender.org>2022-07-25 12:42:27 +0300
commit1c05f30e4dcbf05a7dc1a700cd76dc8c3d70601d (patch)
tree7d56406f87484b007abdf4d6b2906f139de0ba63 /source/blender/editors/sculpt_paint/curves_sculpt_density.cc
parent53113a2e571972e835f43217fea217066892e435 (diff)
Curves: add warning when invalid uv map is used when adding curves
UV maps that are used for surface attachment must not have overlapping uv islands, because then the same uv coordinate would correspond to multiple surface positions. Ref T99936.
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_density.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_density.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
index b07f5c74055..6ad3d0e4aad 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
@@ -277,7 +277,12 @@ struct DensityAddOperationExecutor {
add_inputs.reverse_uv_sampler = &reverse_uv_sampler;
add_inputs.old_roots_kdtree = self_->original_curve_roots_kdtree_;
- geometry::add_curves_on_mesh(*curves_orig_, add_inputs);
+ const geometry::AddCurvesOnMeshOutputs add_outputs = geometry::add_curves_on_mesh(
+ *curves_orig_, add_inputs);
+
+ if (add_outputs.uv_error) {
+ report_invalid_uv_map(stroke_extension.reports);
+ }
DEG_id_tag_update(&curves_id_orig_->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_GEOM | ND_DATA, &curves_id_orig_->id);