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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-11-20 12:45:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-11-20 12:45:03 +0300
commita8777f905846f80385fc90135e000c3169bbefc6 (patch)
tree928a7db22a8553abd35f99a0afe2990be87d69ac /source/blender/blenkernel
parentc0c696b014e3c21b923a2c21fb33a18839a3faa3 (diff)
parent65af15ad887b30e678db9acab75efc7897c9197e (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h45
-rw-r--r--source/blender/blenkernel/CMakeLists.txt1
-rw-r--r--source/blender/blenkernel/intern/mesh_remap.c8
3 files changed, 7 insertions, 47 deletions
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
deleted file mode 100644
index 7c1e0e97565..00000000000
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file BKE_utildefines.h
- * \ingroup bke
- * \brief blender format specific macros
- * \note generic defines should go in BLI_utildefines.h
- */
-
-
-#ifndef __BKE_UTILDEFINES_H__
-#define __BKE_UTILDEFINES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BKE_BIT_TEST_SET(value, test, flag) \
-{ \
- if (test) (value) |= flag; \
- else (value) &= ~flag; \
-} (void)0
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __BKE_UTILDEFINES_H__ */
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 6063c068909..24b0adb1adb 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -304,7 +304,6 @@ set(SRC
BKE_texture.h
BKE_tracking.h
BKE_unit.h
- BKE_utildefines.h
BKE_workspace.h
BKE_world.h
BKE_writeavi.h
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index b0580f75044..f321c94bf00 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -1482,6 +1482,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
for (i = vert_to_refelem_map_src[nearest.index].count; i--;) {
const int index_src = vert_to_refelem_map_src[nearest.index].indices[i];
+ BLI_assert(index_src != -1);
const float dot = dot_v3v3(nors_src[index_src], *nor_dst);
pidx_src = (mode == MREMAP_MODE_LOOP_NEAREST_LOOPNOR) ?
@@ -1522,7 +1523,12 @@ void BKE_mesh_remap_calc_loops_from_dm(
}
}
}
- if (mode == MREMAP_MODE_LOOP_NEAREST_POLYNOR) {
+ if (best_index_src == -1) {
+ /* We found no item to map back from closest vertex... */
+ best_nor_dot = -1.0f;
+ hit_dist = FLT_MAX;
+ }
+ else if (mode == MREMAP_MODE_LOOP_NEAREST_POLYNOR) {
/* Our best_index_src is a poly one for now!
* Have to find its loop matching our closest vertex. */
mp_src = &polys_src[best_index_src];