diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-07 21:36:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-07 21:36:47 +0300 |
commit | 8f21a43535cb200c0569566a1b012aec883aa53c (patch) | |
tree | e41eeff28b248000af473053c59990eb3497bf3a /source/blender/blenkernel | |
parent | a601fd889331c319803daa7505c2c8016f15a47f (diff) |
split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
Diffstat (limited to 'source/blender/blenkernel')
68 files changed, 211 insertions, 298 deletions
diff --git a/source/blender/blenkernel/BKE_array_mallocn.h b/source/blender/blenkernel/BKE_array_mallocn.h new file mode 100644 index 00000000000..c2ced0e5c27 --- /dev/null +++ b/source/blender/blenkernel/BKE_array_mallocn.h @@ -0,0 +1,82 @@ +/* + * $Id: + * + * ***** 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) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** +*/ + +#ifndef BKE_ARRAY_MALLOCN_H +#define BKE_ARRAY_MALLOCN_H + +/*little array macro library. example of usage: + +int *arr = NULL; +V_DECLARE(arr); +int i; + +for (i=0; i<10; i++) { + V_GROW(arr); + arr[i] = something; +} +V_FREE(arr); + +arrays are buffered, using double-buffering (so on each reallocation, +the array size is doubled). supposedly this should give good Big Oh +behaviour, though it may not be the best in practice. +*/ + +#define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp + +/*in the future, I plan on having V_DECLARE allocate stack memory it'll + use at first, and switch over to heap when it needs more. that'll mess + up cases where you'd want to use this API to build a dynamic list for + non-local use, so all such cases should use this macro.*/ +#define V_DYNDECLARE(vec) V_DECLARE(vec) + +/*this returns the entire size of the array, including any buffering.*/ +#define V_SIZE(vec) ((signed int)((vec)==NULL ? 0 : MEM_allocN_len(vec) / sizeof(*vec))) + +/*this returns the logical size of the array, not including buffering.*/ +#define V_COUNT(vec) _##vec##_count + +/*grow the array by one. zeroes the new elements.*/ +#define V_GROW(vec) \ + V_SIZE(vec) > _##vec##_count ? _##vec##_count++ : \ + ((_##vec##_tmp = MEM_callocN(sizeof(*vec)*(_##vec##_count*2+2), #vec " " __FILE__ " ")),\ + (void)(vec && memcpy(_##vec##_tmp, vec, sizeof(*vec) * _##vec##_count)),\ + (void)(vec && (MEM_freeN(vec),1)),\ + (vec = _##vec##_tmp),\ + _##vec##_count++) + +#define V_FREE(vec) if (vec) MEM_freeN(vec); + +/*resets the logical size of an array to zero, but doesn't + free the memory.*/ +#define V_RESET(vec) _##vec##_count=0 + +/*set the count of the array*/ +#define V_SETCOUNT(vec, count) _##vec##_count = (count) + +#endif // BKE_ARRAY_MALLOCN_H diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index 18db68a93af..44ca3842fd9 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -38,6 +38,7 @@ #define BKE_BMESH_H #include "DNA_listBase.h" +#include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BLI_mempool.h" #include "BLI_memarena.h" diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index 46746bbb4a3..781de5e219e 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -27,68 +27,12 @@ * ***** END GPL LICENSE BLOCK ***** */ +/* This file shold contain blender format spesific macros + * generic defines should go in BLI_utildefines.h */ + #ifndef BKE_UTILDEFINES_H #define BKE_UTILDEFINES_H -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -/* Macro to convert a value to string in the preprocessor - * STRINGIFY_ARG: gives the defined name in the string - * STRINGIFY: gives the defined value. */ -#define STRINGIFY_ARG(x) #x -#define STRINGIFY(x) STRINGIFY_ARG(x) - -/* useful for debugging */ -#define AT __FILE__ ":" STRINGIFY(__LINE__) - - -#ifdef __GNUC__ -# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__)) -#else -# define UNUSED(x) UNUSED_ ## x -#endif - - -/* BKE_assert(), default only to print - * for aborting need to define WITH_ASSERT_ABORT */ -#if !defined NDEBUG -# ifdef WITH_ASSERT_ABORT -# define _dummy_abort abort -# else -# define _dummy_abort() (void)0 -# endif -# ifdef __GNUC__ /* just want to check if __func__ is available */ -# define BKE_assert(a) \ -do { \ - if (0 == (a)) { \ - fprintf(stderr, \ - "BKE_assert failed: %s, %s(), %d at \'%s\'\n", \ - __FILE__, __func__, __LINE__, STRINGIFY(a)); \ - _dummy_abort(); \ - } \ -} while (0) -# else -# define BKE_assert(a) \ -do { \ - if (0 == (a)) { \ - fprintf(stderr, \ - "BKE_assert failed: %s, %d at \'%s\'\n", \ - __FILE__, __LINE__, STRINGIFY(a)); \ - _dummy_abort(); \ - } \ -} while (0) -# endif -#else -# define BKE_assert(a) (void)0 -#endif - - /* these values need to be hardcoded in structs, dna does not recognize defines */ /* also defined in DNA_space_types.h */ #ifndef FILE_MAXDIR @@ -97,94 +41,6 @@ do { \ #define FILE_MAX 240 #endif -#define ELEM(a, b, c) ( (a)==(b) || (a)==(c) ) -#define ELEM3(a, b, c, d) ( ELEM(a, b, c) || (a)==(d) ) -#define ELEM4(a, b, c, d, e) ( ELEM(a, b, c) || ELEM(a, d, e) ) -#define ELEM5(a, b, c, d, e, f) ( ELEM(a, b, c) || ELEM3(a, d, e, f) ) -#define ELEM6(a, b, c, d, e, f, g) ( ELEM(a, b, c) || ELEM4(a, d, e, f, g) ) -#define ELEM7(a, b, c, d, e, f, g, h) ( ELEM3(a, b, c, d) || ELEM4(a, e, f, g, h) ) -#define ELEM8(a, b, c, d, e, f, g, h, i) ( ELEM4(a, b, c, d, e) || ELEM4(a, f, g, h, i) ) -#define ELEM9(a, b, c, d, e, f, g, h, i, j) ( ELEM4(a, b, c, d, e) || ELEM5(a, f, g, h, i, j) ) -#define ELEM10(a, b, c, d, e, f, g, h, i, j, k) ( ELEM4(a, b, c, d, e) || ELEM6(a, f, g, h, i, j, k) ) -#define ELEM11(a, b, c, d, e, f, g, h, i, j, k, l) ( ELEM4(a, b, c, d, e) || ELEM7(a, f, g, h, i, j, k, l) ) - -/* shift around elements */ -#define SHIFT3(type, a, b, c) { type tmp; tmp = a; a = c; c = b; b = tmp; } -#define SHIFT4(type, a, b, c, d) { type tmp; tmp = a; a = d; d = c; c = b; b = tmp; } - -/* min/max */ -#define MIN2(x,y) ( (x)<(y) ? (x) : (y) ) -#define MIN3(x,y,z) MIN2( MIN2((x),(y)) , (z) ) -#define MIN4(x,y,z,a) MIN2( MIN2((x),(y)) , MIN2((z),(a)) ) - -#define MAX2(x,y) ( (x)>(y) ? (x) : (y) ) -#define MAX3(x,y,z) MAX2( MAX2((x),(y)) , (z) ) -#define MAX4(x,y,z,a) MAX2( MAX2((x),(y)) , MAX2((z),(a)) ) - -#define INIT_MINMAX(min, max) { (min)[0]= (min)[1]= (min)[2]= 1.0e30f; (max)[0]= (max)[1]= (max)[2]= -1.0e30f; } - -#define INIT_MINMAX2(min, max) { (min)[0]= (min)[1]= 1.0e30f; (max)[0]= (max)[1]= -1.0e30f; } - -#define DO_MIN(vec, min) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; } \ - -#define DO_MAX(vec, max) { if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \ - if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \ - -#define DO_MINMAX(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \ - if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \ - if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \ - -#define DO_MINMAX2(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; } - -/* some math and copy defines */ - -#ifndef SWAP -#define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; } -#endif - -#define ABS(a) ( (a)<0 ? (-(a)) : (a) ) - -#define AVG2(x, y) ( 0.5 * ((x) + (y)) ) - -#define FTOCHAR(val) ((val)<=0.0f)? 0 : (((val)>(1.0f-0.5f/255.0f))? 255 : (char)((255.0f*(val))+0.5f)) -#define FTOUSHORT(val) ((val >= 1.0f-0.5f/65535)? 65535: (val <= 0.0f)? 0: (unsigned short)(val*65535.0f + 0.5f)) - -#define VECCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);} -#define VECCOPY2D(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1);} -#define QUATCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2); *(v1+3)= *(v2+3);} -#define LONGCOPY(a, b, c) {int lcpc=c, *lcpa=(int *)a, *lcpb=(int *)b; while(lcpc-->0) *(lcpa++)= *(lcpb++);} - - -#define VECADD(v1,v2,v3) {*(v1)= *(v2) + *(v3); *(v1+1)= *(v2+1) + *(v3+1); *(v1+2)= *(v2+2) + *(v3+2);} -#define VECSUB(v1,v2,v3) {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1); *(v1+2)= *(v2+2) - *(v3+2);} -#define VECSUB2D(v1,v2,v3) {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1);} -#define VECADDFAC(v1,v2,v3,fac) {*(v1)= *(v2) + *(v3)*(fac); *(v1+1)= *(v2+1) + *(v3+1)*(fac); *(v1+2)= *(v2+2) + *(v3+2)*(fac);} -#define VECSUBFAC(v1,v2,v3,fac) {*(v1)= *(v2) - *(v3)*(fac); *(v1+1)= *(v2+1) - *(v3+1)*(fac); *(v1+2)= *(v2+2) - *(v3+2)*(fac);} -#define QUATADDFAC(v1,v2,v3,fac) {*(v1)= *(v2) + *(v3)*(fac); *(v1+1)= *(v2+1) + *(v3+1)*(fac); *(v1+2)= *(v2+2) + *(v3+2)*(fac); *(v1+3)= *(v2+3) + *(v3+3)*(fac);} - -#define INPR(v1, v2) ( (v1)[0]*(v2)[0] + (v1)[1]*(v2)[1] + (v1)[2]*(v2)[2] ) - - -/* some misc stuff.... */ -#define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c) -#define CLAMPIS(a, b, c) ((a)<(b) ? (b) : (a)>(c) ? (c) : (a)) -#define CLAMPTEST(a, b, c) if((b)<(c)) {CLAMP(a, b, c);} else {CLAMP(a, c, b);} - -#define IS_EQ(a,b) ((fabs((double)(a)-(b)) >= (double) FLT_EPSILON) ? 0 : 1) - -#define IS_EQT(a, b, c) ((a > b)? (((a-b) <= c)? 1:0) : ((((b-a) <= c)? 1:0))) -#define IN_RANGE(a, b, c) ((b < c)? ((b<a && a<c)? 1:0) : ((c<a && a<b)? 1:0)) -#define IN_RANGE_INCL(a, b, c) ((b < c)? ((b<=a && a<=c)? 1:0) : ((c<=a && a<=b)? 1:0)) - /* this weirdo pops up in two places ... */ #if !defined(WIN32) #ifndef O_BINARY @@ -203,8 +59,6 @@ do { \ #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid -#define BLEN MAKE_ID('B','L','E','N') - #define DATA MAKE_ID('D','A','T','A') #define GLOB MAKE_ID('G','L','O','B') #define IMAG MAKE_ID('I','M','A','G') @@ -216,28 +70,6 @@ do { \ #define ENDB MAKE_ID('E','N','D','B') - -/* This one rotates the bytes in an int64, int (32) and short (16) */ -#define SWITCH_INT64(a) { \ - char s_i, *p_i; \ - p_i= (char *)&(a); \ - s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \ - s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \ - s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \ - s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; } - -#define SWITCH_INT(a) { \ - char s_i, *p_i; \ - p_i= (char *)&(a); \ - s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \ - s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; } - -#define SWITCH_SHORT(a) { \ - char s_i, *p_i; \ - p_i= (char *)&(a); \ - s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; } - - /* Bit operations */ #define BTST(a,b) ( ( (a) & 1<<(b) )!=0 ) #define BNTST(a,b) ( ( (a) & 1<<(b) )==0 ) @@ -253,70 +85,6 @@ do { \ #endif #define GS(a) (*((short *)(a))) -/* Warning-free macros for storing ints in pointers. Use these _only_ - * for storing an int in a pointer, not a pointer in an int (64bit)! */ -#define SET_INT_IN_POINTER(i) ((void*)(intptr_t)(i)) -#define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i)) - -/*little array macro library. example of usage: - -int *arr = NULL; -V_DECLARE(arr); -int i; - -for (i=0; i<10; i++) { - V_GROW(arr); - arr[i] = something; -} -V_FREE(arr); - -arrays are buffered, using double-buffering (so on each reallocation, -the array size is doubled). supposedly this should give good Big Oh -behaviour, though it may not be the best in practice. -*/ - -#define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp - -/*in the future, I plan on having V_DECLARE allocate stack memory it'll - use at first, and switch over to heap when it needs more. that'll mess - up cases where you'd want to use this API to build a dynamic list for - non-local use, so all such cases should use this macro.*/ -#define V_DYNDECLARE(vec) V_DECLARE(vec) - -/*this returns the entire size of the array, including any buffering.*/ -#define V_SIZE(vec) ((signed int)((vec)==NULL ? 0 : MEM_allocN_len(vec) / sizeof(*vec))) - -/*this returns the logical size of the array, not including buffering.*/ -#define V_COUNT(vec) _##vec##_count - -/*grow the array by one. zeroes the new elements.*/ -#define V_GROW(vec) \ - V_SIZE(vec) > _##vec##_count ? _##vec##_count++ : \ - ((_##vec##_tmp = MEM_callocN(sizeof(*vec)*(_##vec##_count*2+2), #vec " " __FILE__ " ")),\ - (void)(vec && memcpy(_##vec##_tmp, vec, sizeof(*vec) * _##vec##_count)),\ - (void)(vec && (MEM_freeN(vec),1)),\ - (vec = _##vec##_tmp),\ - _##vec##_count++) - -#define V_FREE(vec) if (vec) MEM_freeN(vec); - -/*resets the logical size of an array to zero, but doesn't - free the memory.*/ -#define V_RESET(vec) _##vec##_count=0 - -/*set the count of the array*/ -#define V_SETCOUNT(vec, count) _##vec##_count = (count) - -/*little macro so inline keyword works*/ -#if defined(_MSC_VER) -#define BM_INLINE static __forceinline -#elif defined(__GNUC__) -#define BM_INLINE static inline __attribute((always_inline)) -#else -/* #warning "MSC/GNUC defines not found, inline non-functional" */ -#define BM_INLINE static -#endif - #define BMEMSET(mem, val, size) {unsigned int _i; char *_c = (char*) mem; for (_i=0; _i<size; _i++) *_c++ = val;} -#endif +#endif // BKE_UTILDEFINES_H diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 4df5183980f..672ef0b6494 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -144,6 +144,7 @@ set(SRC BKE_anim.h BKE_animsys.h BKE_armature.h + BKE_array_mallocn.h BKE_blender.h BKE_bmesh.h BKE_bmeshCustomData.h diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index 341eb38b388..e80d4827155 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -38,10 +38,12 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "BLI_edgehash.h" +#include "BLI_utildefines.h" + #include "BKE_mesh.h" #include "BKE_cdderivedmesh.h" -#include "BLI_edgehash.h" //XXX #include "BIF_editmesh.h" //XXX #include "editmesh.h" #include "bmesh_private.h" diff --git a/source/blender/blenkernel/intern/BME_eulers.c b/source/blender/blenkernel/intern/BME_eulers.c index 036cd4a23e2..cd9429982dc 100644 --- a/source/blender/blenkernel/intern/BME_eulers.c +++ b/source/blender/blenkernel/intern/BME_eulers.c @@ -33,7 +33,7 @@ */ #include "MEM_guardedalloc.h" - +#include "BLI_utildefines.h" #include "bmesh_private.h" diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index de3eb94beac..9463d22e3be 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -33,8 +33,9 @@ */ #include <limits.h> -#include "MEM_guardedalloc.h" +#include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" #include "BKE_bmesh.h" /** * MISC utility functions. diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c index 444bc10d562..0c8352ad8b0 100644 --- a/source/blender/blenkernel/intern/BME_tools.c +++ b/source/blender/blenkernel/intern/BME_tools.c @@ -38,8 +38,10 @@ #include "DNA_meshdata_types.h" #include "DNA_object_types.h" -#include "BKE_bmesh.h" #include "BLI_math.h" +#include "BLI_utildefines.h" + +#include "BKE_bmesh.h" /*split this all into a seperate bevel.c file in src*/ diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 3d87b77dec9..3b8da3975a0 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -43,6 +43,7 @@ #include "BLI_math.h" #include "BLI_memarena.h" #include "BLI_pbvh.h" +#include "BLI_utildefines.h" #include "BKE_cdderivedmesh.h" #include "BKE_displist.h" diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index fdd51dd207f..bd36e1b2720 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -39,6 +39,11 @@ #include "DNA_scene_types.h" #include "DNA_object_types.h" +#include "BLI_blenlib.h" +#include "BLI_math.h" +#include "BLI_utildefines.h" +#include "BLI_ghash.h" + #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_anim.h" @@ -53,10 +58,6 @@ #include "BIK_api.h" -#include "BLI_blenlib.h" -#include "BLI_ghash.h" -#include "BLI_math.h" - #include "RNA_access.h" /* *********************** NOTE ON POSE AND ACTION ********************** diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index c372855b3eb..8cac3860e79 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -39,6 +39,7 @@ #include "BLI_editVert.h" #include "BLI_math.h" #include "BLI_rand.h" +#include "BLI_utildefines.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index abe5b50664f..e46c1179111 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -36,8 +36,8 @@ #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" -#include "BKE_library.h" #include "BLI_dynstr.h" +#include "BLI_utildefines.h" #include "DNA_anim_types.h" #include "DNA_material_types.h" @@ -50,6 +50,7 @@ #include "BKE_nla.h" #include "BKE_global.h" #include "BKE_main.h" +#include "BKE_library.h" #include "BKE_utildefines.h" #include "RNA_access.h" diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 6b21e45ddd9..0367d854169 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -36,6 +36,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index b218632e8e5..7d75912f31d 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -58,6 +58,7 @@ #include "BLI_bpath.h" #include "BLI_dynstr.h" #include "BLI_path_util.h" +#include "BLI_utildefines.h" #include "IMB_imbuf.h" diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 1bde0639055..85ee3760849 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -41,6 +41,8 @@ #include "BLI_math.h" #include "BLI_blenlib.h" #include "BLI_kdtree.h" +#include "BLI_utildefines.h" + #include "BKE_collision.h" #include "BKE_effect.h" #include "BKE_boids.h" diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 649b3e3ad9b..a78d2ecaaa2 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -45,6 +45,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" #include "BLI_rand.h" +#include "BLI_utildefines.h" #include "BKE_brush.h" #include "BKE_colortools.h" diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 882295b931c..0d3825fa8a8 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -34,9 +34,11 @@ #include "DNA_meshdata_types.h" +#include "BLI_editVert.h" +#include "BLI_utildefines.h" + #include "BKE_DerivedMesh.h" #include "BKE_utildefines.h" -#include "BLI_editVert.h" #include "BLI_math.h" #include "MEM_guardedalloc.h" diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index efdfdbc986f..956972e8d5b 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -36,17 +36,18 @@ #include <string.h> #include "BIF_gl.h" -#include "BKE_cdderivedmesh.h" -#include "BKE_global.h" -#include "BKE_mesh.h" -#include "BKE_paint.h" -#include "BKE_utildefines.h" - #include "BLI_blenlib.h" #include "BLI_edgehash.h" #include "BLI_editVert.h" #include "BLI_math.h" #include "BLI_pbvh.h" +#include "BLI_utildefines.h" + +#include "BKE_cdderivedmesh.h" +#include "BKE_global.h" +#include "BKE_mesh.h" +#include "BKE_paint.h" +#include "BKE_utildefines.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index b283120249e..4b14e64ee27 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -34,6 +34,7 @@ #include "BLI_math.h" #include "BLI_edgehash.h" +#include "BLI_utildefines.h" #include "BKE_cdderivedmesh.h" #include "BKE_cloth.h" diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index b2d587151b1..8f028914ece 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -42,6 +42,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" #include "BLI_edgehash.h" +#include "BLI_utildefines.h" #include "BKE_DerivedMesh.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 1b3d100c3f8..282a055e04c 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -41,14 +41,15 @@ #include "DNA_color_types.h" #include "DNA_curve_types.h" +#include "BLI_blenlib.h" +#include "BLI_math.h" +#include "BLI_utildefines.h" + #include "BKE_colortools.h" #include "BKE_curve.h" #include "BKE_fcurve.h" #include "BKE_utildefines.h" -#include "BLI_blenlib.h" -#include "BLI_math.h" - #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index b6e68a71bc9..ad6b3b8f837 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -39,6 +39,7 @@ #include "BLI_listbase.h" #include "BLI_math.h" #include "BLI_editVert.h" +#include "BLI_utildefines.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 6dd3eb43e29..b5550768e55 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -35,8 +35,10 @@ #include <stdlib.h> #include "MEM_guardedalloc.h" + #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BLI_utildefines.h" #include "DNA_curve_types.h" #include "DNA_material_types.h" diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index f7606a344c9..134b0e10280 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -46,6 +46,7 @@ #include "BLI_linklist.h" #include "BLI_math.h" #include "BLI_mempool.h" +#include "BLI_utildefines.h" #include "BKE_customdata.h" #include "BKE_customdata_file.h" diff --git a/source/blender/blenkernel/intern/customdata_file.c b/source/blender/blenkernel/intern/customdata_file.c index 5954ac1b022..ebc21344810 100644 --- a/source/blender/blenkernel/intern/customdata_file.c +++ b/source/blender/blenkernel/intern/customdata_file.c @@ -28,6 +28,7 @@ #include "BLI_fileops.h" #include "BLI_string.h" +#include "BLI_utildefines.h" #include "BKE_customdata_file.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 5fdb8f0206a..61865f5579c 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -29,7 +29,11 @@ #include <string.h> #include <math.h> +#include "MEM_guardedalloc.h" + #include "BLI_winstuff.h" +#include "BLI_utildefines.h" +#include "BLI_ghash.h" #include "DNA_anim_types.h" #include "DNA_camera_types.h" @@ -41,10 +45,6 @@ #include "DNA_screen_types.h" #include "DNA_windowmanager_types.h" -#include "MEM_guardedalloc.h" - -#include "BLI_ghash.h" - #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_effect.h" @@ -61,6 +61,7 @@ #include "BKE_pointcache.h" #include "BKE_scene.h" #include "BKE_screen.h" +#include "BKE_utildefines.h" #include "depsgraph_private.h" diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 8c32733dd66..53e33ee9bd8 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -35,7 +35,6 @@ #include "MEM_guardedalloc.h" - #include "DNA_curve_types.h" #include "DNA_meshdata_types.h" #include "DNA_scene_types.h" @@ -46,6 +45,7 @@ #include "BLI_math.h" #include "BLI_editVert.h" #include "BLI_scanfill.h" +#include "BLI_utildefines.h" #include "BKE_global.h" #include "BKE_displist.h" diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 51f2203b525..aeec2a588c7 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -59,6 +59,7 @@ #include "BLI_listbase.h" #include "BLI_noise.h" #include "BLI_rand.h" +#include "BLI_utildefines.h" #include "PIL_time.h" diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c index d19226b2478..612ea84abe5 100644 --- a/source/blender/blenkernel/intern/exotic.c +++ b/source/blender/blenkernel/intern/exotic.c @@ -61,11 +61,12 @@ #include "DNA_camera_types.h" #include "DNA_scene_types.h" -#include "BKE_utildefines.h" #include "BLI_blenlib.h" #include "BLI_math.h" #include "BLI_storage.h" +#include "BLI_utildefines.h" +#include "BKE_utildefines.h" #include "BKE_blender.h" #include "BKE_global.h" #include "BKE_main.h" diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 4a596b079cf..16d332c3bcb 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -41,6 +41,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BLI_utildefines.h" #include "BKE_fcurve.h" #include "BKE_animsys.h" diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c index ef89d39864a..c4db31d732d 100644 --- a/source/blender/blenkernel/intern/fluidsim.c +++ b/source/blender/blenkernel/intern/fluidsim.c @@ -43,6 +43,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "BKE_cdderivedmesh.h" #include "BKE_customdata.h" diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 0376d75d651..40636fe59d1 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -38,6 +38,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" /* windows needs for M_PI */ +#include "BLI_utildefines.h" #include "BKE_fcurve.h" #include "BKE_idprop.h" diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index ec63975a3c0..9a9d67a01f8 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -41,6 +41,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" #include "BLI_vfontdata.h" +#include "BLI_utildefines.h" #include "DNA_packedFile_types.h" #include "DNA_curve_types.h" @@ -49,9 +50,7 @@ #include "DNA_object_types.h" #include "BKE_utildefines.h" - #include "BKE_packedFile.h" - #include "BKE_library.h" #include "BKE_font.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 80f26277689..4d02697920b 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -33,8 +33,8 @@ #include "MEM_guardedalloc.h" - #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "DNA_gpencil_types.h" diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index e125f3d4bd7..3b82114fe35 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -41,6 +41,7 @@ #include "DNA_particle_types.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "BKE_utildefines.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c index 30e4318e256..1df272fad30 100644 --- a/source/blender/blenkernel/intern/icons.c +++ b/source/blender/blenkernel/intern/icons.c @@ -40,6 +40,7 @@ #include "DNA_world_types.h" #include "DNA_brush_types.h" +#include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BKE_icons.h" diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 70bfc96f0a2..301588deaa2 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -60,6 +60,7 @@ #include "BLI_blenlib.h" #include "BLI_threads.h" +#include "BLI_utildefines.h" #include "BKE_bmfont.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index e19f36a2a0b..b810e028b62 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -37,6 +37,7 @@ #include "BLI_threads.h" #include "BLI_math.h" #include "BLI_linklist.h" +#include "BLI_utildefines.h" #include "BKE_cloth.h" #include "BKE_collision.h" diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index a040c27caa0..cc890683d7b 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -59,6 +59,7 @@ #include "BLI_math.h" /* windows needs for M_PI */ #include "BLI_blenlib.h" #include "BLI_dynstr.h" +#include "BLI_utildefines.h" #include "BKE_utildefines.h" diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 5a46d73201f..a4958940b62 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -39,6 +39,7 @@ #include "BLI_blenlib.h" #include "BLI_editVert.h" #include "BLI_math_vector.h" +#include "BLI_utildefines.h" #include "DNA_anim_types.h" #include "DNA_key_types.h" diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 891d42c4a76..15761dce4b3 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -40,6 +40,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BLI_utildefines.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 08adfdc1960..6af7df67fa9 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -67,9 +67,9 @@ #include "DNA_world_types.h" #include "DNA_gpencil_types.h" - #include "BLI_blenlib.h" #include "BLI_dynstr.h" +#include "BLI_utildefines.h" #include "BKE_utildefines.h" #include "BKE_animsys.h" diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index c8fb921285c..887b1fe48a3 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -45,6 +45,7 @@ #include "BLI_math.h" #include "BLI_listbase.h" +#include "BLI_utildefines.h" #include "BKE_animsys.h" #include "BKE_displist.h" diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 8658d7e482f..bd1c009adc7 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -48,6 +48,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BLI_utildefines.h" #include "BKE_utildefines.h" diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 03fab0718da..15ececd0d42 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -43,6 +43,12 @@ #include "DNA_meshdata_types.h" #include "DNA_ipo_types.h" +#include "BLI_blenlib.h" +#include "BLI_editVert.h" +#include "BLI_math.h" +#include "BLI_edgehash.h" +#include "BLI_utildefines.h" + #include "BKE_animsys.h" #include "BKE_main.h" #include "BKE_DerivedMesh.h" @@ -60,12 +66,6 @@ #include "BKE_object.h" #include "BKE_utildefines.h" -#include "BLI_blenlib.h" -#include "BLI_editVert.h" -#include "BLI_math.h" -#include "BLI_edgehash.h" - - EditMesh *BKE_mesh_get_editmesh(Mesh *me) { return me->edit_mesh; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index f8fdc9e32a4..cc3d6a96092 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -40,11 +40,13 @@ #include <math.h> #include <float.h> +#include "MEM_guardedalloc.h" + #include "DNA_armature_types.h" #include "DNA_object_types.h" #include "DNA_meshdata_types.h" -#include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" #include "BKE_bmesh.h" #include "BKE_cloth.h" diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index a3c13b36dcf..79de12e1ce8 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -38,6 +38,7 @@ #include "BLI_math.h" #include "BLI_pbvh.h" #include "BLI_editVert.h" +#include "BLI_utildefines.h" #include "BKE_cdderivedmesh.h" #include "BKE_mesh.h" diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 5996bdc9f9a..fc7950e29c3 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -36,6 +36,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" #include "BLI_ghash.h" #include "DNA_anim_types.h" diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index a2b6163321b..e564a32056f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -57,6 +57,7 @@ #include "BLI_editVert.h" #include "BLI_math.h" #include "BLI_pbvh.h" +#include "BLI_utildefines.h" #include "BKE_utildefines.h" diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index c278bf3b3d2..12ebaf7578a 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -47,6 +47,7 @@ #include "DNA_packedFile_types.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "BKE_utildefines.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 116ed3c8ef2..945131b60b2 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -31,6 +31,8 @@ #include "DNA_scene_types.h" #include "DNA_brush_types.h" +#include "BLI_utildefines.h" + #include "BKE_utildefines.h" #include "BKE_brush.h" #include "BKE_library.h" diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index d3a0cd5df7c..27a19ecf1a5 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -46,10 +46,11 @@ #include "DNA_scene_types.h" #include "BLI_blenlib.h" +#include "BLI_math.h" +#include "BLI_utildefines.h" #include "BLI_kdtree.h" #include "BLI_rand.h" #include "BLI_threads.h" -#include "BLI_math.h" #include "BKE_anim.h" #include "BKE_animsys.h" @@ -2477,7 +2478,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle float orco[3], ornor[3], hairmat[4][4], t, dvec[3], off1[4][3], off2[4][3]; float length, max_length = 1.0f, cur_length = 0.0f; float eff_length, eff_vec[3], weight[4]; - int k, cpa_num, maxw=0; + int k, cpa_num; short cpa_from; if(!pcache) @@ -2749,7 +2750,6 @@ static void *exec_child_path_cache(void *data) void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupdate) { - ParticleSettings *part = sim->psys->part; ParticleThread *pthreads; ParticleThreadContext *ctx; ParticleCacheKey **cache; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 207a9b8f839..646f8080b5c 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -63,6 +63,7 @@ #include "BLI_listbase.h" #include "BLI_threads.h" #include "BLI_storage.h" /* For _LARGEFILE64_SOURCE; zlib needs this on some systems */ +#include "BLI_utildefines.h" #include "BKE_main.h" #include "BKE_animsys.h" @@ -3641,7 +3642,6 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra)) static int emit_particles(ParticleSimulationData *sim, PTCacheID *pid, float UNUSED(cfra)) { ParticleSystem *psys = sim->psys; - ParticleSettings *part = psys->part; int oldtotpart = psys->totpart; int totpart = tot_particles(psys, pid); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 9ad00247dc2..6f52803f6b2 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -44,6 +44,7 @@ #include "BLI_blenlib.h" #include "BLI_threads.h" #include "BLI_math.h" +#include "BLI_utildefines.h" #include "PIL_time.h" diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index 5df912c871d..1dd27987cf8 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -29,6 +29,7 @@ #include "BLI_blenlib.h" #include "BLI_dynstr.h" +#include "BLI_utildefines.h" #include "BKE_report.h" #include "BKE_global.h" /* G.background only */ diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 9aeb9a89c90..ded32de48d3 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -39,6 +39,8 @@ #include <io.h> #endif +#include "MEM_guardedalloc.h" + #include "DNA_anim_types.h" #include "DNA_group_types.h" #include "DNA_object_types.h" @@ -46,7 +48,9 @@ #include "DNA_screen_types.h" #include "DNA_sequence_types.h" -#include "MEM_guardedalloc.h" +#include "BLI_math.h" +#include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "BKE_anim.h" #include "BKE_animsys.h" @@ -69,9 +73,6 @@ //XXX #include "BIF_previewrender.h" //XXX #include "BIF_editseq.h" -#include "BLI_math.h" -#include "BLI_blenlib.h" - //XXX #include "nla.h" #ifdef WIN32 diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c index b25c533ad4c..122e186bcd7 100644 --- a/source/blender/blenkernel/intern/seqcache.c +++ b/source/blender/blenkernel/intern/seqcache.c @@ -32,6 +32,7 @@ #include "DNA_sequence_types.h" #include "BKE_sequencer.h" +#include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BLI_mempool.h" #include <pthread.h> diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index c11b51b9dd4..2d31cf7ba46 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -35,6 +35,7 @@ #include "PIL_dynlib.h" #include "BLI_math.h" /* windows needs for M_PI */ +#include "BLI_utildefines.h" #include "DNA_scene_types.h" #include "DNA_sequence_types.h" diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 03d4f3da889..4a3c80afaa8 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -41,6 +41,14 @@ #include "DNA_object_types.h" #include "DNA_sound_types.h" +#include "BLI_math.h" +#include "BLI_fileops.h" +#include "BLI_listbase.h" +#include "BLI_path_util.h" +#include "BLI_string.h" +#include "BLI_threads.h" +#include "BLI_utildefines.h" + #include "BKE_animsys.h" #include "BKE_global.h" #include "BKE_image.h" @@ -51,12 +59,6 @@ #include "RNA_access.h" #include "RE_pipeline.h" -#include "BLI_math.h" -#include "BLI_fileops.h" -#include "BLI_listbase.h" -#include "BLI_path_util.h" -#include "BLI_string.h" -#include "BLI_threads.h" #include <pthread.h> #include "IMB_imbuf.h" diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 16e4933332c..ee39e639a99 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -40,6 +40,10 @@ #include "DNA_mesh_types.h" #include "DNA_scene_types.h" +#include "BLI_editVert.h" +#include "BLI_math.h" +#include "BLI_utildefines.h" + #include "BKE_shrinkwrap.h" #include "BKE_DerivedMesh.h" #include "BKE_lattice.h" @@ -48,10 +52,6 @@ #include "BKE_mesh.h" #include "BKE_subsurf.h" -#include "BLI_editVert.h" -#include "BLI_math.h" - - /* Util macros */ #define OUT_OF_MEMORY() ((void)printf("Shrinkwrap: Out of memory\n")) diff --git a/source/blender/blenkernel/intern/sketch.c b/source/blender/blenkernel/intern/sketch.c index 7e39cdd1196..a81f49ddc58 100644 --- a/source/blender/blenkernel/intern/sketch.c +++ b/source/blender/blenkernel/intern/sketch.c @@ -31,6 +31,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BLI_utildefines.h" #include "BKE_sketch.h" #include "BKE_utildefines.h" diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 9a0f278bcd0..41732ff3735 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -48,6 +48,7 @@ #include "BLI_edgehash.h" #include "BLI_kdtree.h" #include "BLI_kdopbvh.h" +#include "BLI_utildefines.h" #include "BKE_bvhutils.h" #include "BKE_cdderivedmesh.h" diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index eb56331acfb..6814f28f51c 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -63,6 +63,7 @@ variables on the UI for now #include "DNA_meshdata_types.h" #include "BLI_math.h" +#include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BLI_threads.h" diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 874fd0fef17..02b3d858a5f 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -41,6 +41,13 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "BLI_blenlib.h" +#include "BLI_edgehash.h" +#include "BLI_math.h" +#include "BLI_memarena.h" +#include "BLI_pbvh.h" +#include "BLI_utildefines.h" + #include "BKE_cdderivedmesh.h" #include "BKE_global.h" #include "BKE_mesh.h" @@ -50,12 +57,6 @@ #include "BKE_subsurf.h" #include "BKE_utildefines.h" -#include "BLI_blenlib.h" -#include "BLI_edgehash.h" -#include "BLI_math.h" -#include "BLI_memarena.h" -#include "BLI_pbvh.h" - #include "BIF_gl.h" #include "BIF_glutil.h" diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 44a8141adff..8d73c0c32ae 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -36,6 +36,7 @@ #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "DNA_constraint_types.h" #include "DNA_controller_types.h" diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 595b85955b8..11c0ce74b4a 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -38,11 +38,10 @@ #include "PIL_dynlib.h" - - #include "BLI_blenlib.h" #include "BLI_math.h" #include "BLI_kdopbvh.h" +#include "BLI_utildefines.h" #include "DNA_key_types.h" #include "DNA_object_types.h" diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index de708f216fd..0bfc0065b1a 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -38,6 +38,7 @@ #include "DNA_scene_types.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "BKE_global.h" #include "BKE_main.h" diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c index dd63c266491..625a9168271 100644 --- a/source/blender/blenkernel/intern/writeframeserver.c +++ b/source/blender/blenkernel/intern/writeframeserver.c @@ -47,6 +47,8 @@ #include "DNA_userdef_types.h" +#include "BLI_utildefines.h" + #include "BKE_utildefines.h" #include "BKE_global.h" #include "BKE_report.h" |