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
path: root/source
diff options
context:
space:
mode:
authorishbosamiya <ishbosamiya@gmail.com>2019-07-30 15:06:56 +0300
committerishbosamiya <ishbosamiya@gmail.com>2019-07-30 15:06:56 +0300
commit4866294a4348b76a5f643e463d5606373d4ffe40 (patch)
tree049e7d5e0f5292ee0cf167c1665df4886837f045 /source
parent316e77be93438f83c3d57833c5634ff569c5990d (diff)
Cloth: optimize obstacle metric by returning if planes is empty
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/cloth_remeshing.cpp5
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);
}