[Bf-blender-cvs] [34e30baedf7] blender-v3.3-release: Fix T100673: crash when using slide brush without attachment info

Jacques Lucke noreply at git.blender.org
Tue Aug 30 12:20:54 CEST 2022


Commit: 34e30baedf7eee625deeba3ab1209be7efbaaf04
Author: Jacques Lucke
Date:   Tue Aug 30 12:20:37 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB34e30baedf7eee625deeba3ab1209be7efbaaf04

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.

===================================================================

M	source/blender/editors/sculpt_paint/curves_sculpt_slide.cc

===================================================================

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;



More information about the Bf-blender-cvs mailing list