diff options
author | ishbosamiya <ishbosamiya@gmail.com> | 2019-07-30 15:06:56 +0300 |
---|---|---|
committer | ishbosamiya <ishbosamiya@gmail.com> | 2019-07-30 15:06:56 +0300 |
commit | 4866294a4348b76a5f643e463d5606373d4ffe40 (patch) | |
tree | 049e7d5e0f5292ee0cf167c1665df4886837f045 /source | |
parent | 316e77be93438f83c3d57833c5634ff569c5990d (diff) |
Cloth: optimize obstacle metric by returning if planes is empty
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/cloth_remeshing.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cloth_remeshing.cpp b/source/blender/blenkernel/intern/cloth_remeshing.cpp index 3c87c57072c..da2c764eb5d 100644 --- a/source/blender/blenkernel/intern/cloth_remeshing.cpp +++ b/source/blender/blenkernel/intern/cloth_remeshing.cpp @@ -2147,6 +2147,11 @@ static void cloth_remeshing_obstacle_metric( } } + if (planes.empty()) { + zero_m2(r_mat); + printf("planes is empty, returning\n"); + return; + } cloth_remeshing_obstacle_metric_calculation(bm, f, planes, r_mat); } |