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.
This commit is contained in:
parent
a97ae83a09
commit
34e30baedf
Notes:
blender-bot
2023-02-14 08:06:33 +01:00
Referenced by issue #100673, Curve hair slide brush crashes due to empty/missing surface_uv_coords attribute
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue