[Bf-blender-cvs] [4866294a434] soc-2019-adaptive-cloth: Cloth: optimize obstacle metric by returning if planes is empty
ishbosamiya
noreply at git.blender.org
Wed Jul 31 11:34:58 CEST 2019
Commit: 4866294a4348b76a5f643e463d5606373d4ffe40
Author: ishbosamiya
Date: Tue Jul 30 17:36:56 2019 +0530
Branches: soc-2019-adaptive-cloth
https://developer.blender.org/rB4866294a4348b76a5f643e463d5606373d4ffe40
Cloth: optimize obstacle metric by returning if planes is empty
===================================================================
M source/blender/blenkernel/intern/cloth_remeshing.cpp
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list