From 1c05f30e4dcbf05a7dc1a700cd76dc8c3d70601d Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 25 Jul 2022 11:42:27 +0200 Subject: 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. --- source/blender/editors/sculpt_paint/curves_sculpt_density.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_density.cc') 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); -- cgit v1.2.3