[Bf-blender-cvs] [f6bec570c5c] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Wed Nov 7 02:28:39 CET 2018
Commit: f6bec570c5cd87a1e8635837650217c783b158e0
Author: Campbell Barton
Date: Wed Nov 7 12:19:10 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBf6bec570c5cd87a1e8635837650217c783b158e0
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_mesh.h
index 3d5a33f9972,6d2a431f667..8f0c81ce4f9
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@@ -31,18 -31,9 +31,18 @@@
* \ingroup bke
*/
+/* defines BLI_INLINE */
- #include "BLI_utildefines.h"
++#include "BLI_compiler_compat.h"
+
+/* defines CustomDataMask */
+#include "BKE_customdata.h"
+
struct ID;
struct BMeshCreateParams;
+struct BMeshFromMeshParams;
+struct BMeshToMeshParams;
struct BoundBox;
+struct Depsgraph;
struct EdgeHash;
struct ListBase;
struct LinkNode;
diff --cc source/blender/blenkernel/intern/subdiv_inline.h
index 4dc300e8577,00000000000..7eebde48bdc
mode 100644,000000..100644
--- a/source/blender/blenkernel/intern/subdiv_inline.h
+++ b/source/blender/blenkernel/intern/subdiv_inline.h
@@@ -1,78 -1,0 +1,80 @@@
+/*
+ * ***** 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.
+ *
+ * The Original Code is Copyright (C) 2018 by Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Sergey Sharybin.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenkernel/intern/subdiv_inline.h
+ * \ingroup bke
+ */
+
+#ifndef __SUBDIV_INLINE_H__
+#define __SUBDIV_INLINE_H__
+
++#include "BLI_assert.h"
++#include "BLI_compiler_compat.h"
++
+#include "BKE_subdiv.h"
- #include "BLI_utildefines.h"
+
+BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv(
+ const float ptex_u, const float ptex_v,
+ float *r_grid_u, float *r_grid_v)
+{
+ *r_grid_u = 1.0f - ptex_v;
+ *r_grid_v = 1.0f - ptex_u;
+}
+
+BLI_INLINE int BKE_subdiv_grid_size_from_level(const int level)
+{
+ return (1 << (level - 1)) + 1;
+}
+
+BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(
+ const float u, const float v,
+ float *r_u, float *r_v)
+{
+ int corner;
+ if (u <= 0.5f && v <= 0.5f) {
+ corner = 0;
+ *r_u = 2.0f * u;
+ *r_v = 2.0f * v;
+ }
+ else if (u > 0.5f && v <= 0.5f) {
+ corner = 1;
+ *r_u = 2.0f * v;
+ *r_v = 2.0f * (1.0f - u);
+ }
+ else if (u > 0.5f && v > 0.5f) {
+ corner = 2;
+ *r_u = 2.0f * (1.0f - u);
+ *r_v = 2.0f * (1.0f - v);
+ }
+ else {
+ BLI_assert(u <= 0.5f && v >= 0.5f);
+ corner = 3;
+ *r_u = 2.0f * (1.0f - v);
+ *r_v = 2.0f * u;
+ }
+ return corner;
+}
+
+#endif /* __SUBDIV_INLINE_H__ */
More information about the Bf-blender-cvs
mailing list