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-08-30 13:20:37 +0300
committerJacques Lucke <jacques@blender.org>2022-08-30 13:20:37 +0300
commit34e30baedf7eee625deeba3ab1209be7efbaaf04 (patch)
treebb359db94b4ffc1772f3d3b72d6fbc2e7c36fb66
parenta97ae83a09e0a67168f1d3cdcbafd5b1ff16e3c9 (diff)
Fix T100673: crash when using slide brush without attachment info
The slide brush requires attachment information on the curves. Now a warning is shown instead of crashing Blender. The attachment information can be generated by executing the `Curves > Snap to Nearest Surface` operator.
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_slide.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc b/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc
index ebdff8a6c4b..007bff0b170 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc
@@ -149,6 +149,12 @@ struct SlideOperationExecutor {
report_missing_uv_map_on_original_surface(stroke_extension.reports);
return;
}
+ if (curves_orig_->surface_uv_coords().is_empty()) {
+ BKE_report(stroke_extension.reports,
+ RPT_WARNING,
+ TIP_("Curves do not have surface attachment information"));
+ return;
+ }
const StringRefNull uv_map_name = curves_id_orig_->surface_uv_map;
curves_sculpt_ = ctx_.scene->toolsettings->curves_sculpt;