diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-04 19:45:25 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-04 19:45:25 +0400 |
commit | 360f831339bfbeec0dc3d545b698117f4f6e2c42 (patch) | |
tree | ab623e7f5117edc863b3d8da06e32b6b3f919d1b | |
parent | 7e8a3aa0b1c1217140c08bcb1c7bf489b5cc5d25 (diff) |
Apricot Branchapricot
==============
Various changes from trunk that were somehow missed with merges, and
small code cleanups and fixes.
54 files changed, 110 insertions, 195 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d9bee46a2da..97bbc8ec399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,7 +287,7 @@ IF(WIN32) SET(FFMPEG ${LIBDIR}/ffmpeg) SET(FFMPEG_INC ${FFMPEG}/include) - SET(FFMPEG_LIB avcodec-51 avformat-51 avutil-49) + SET(FFMPEG_LIB avcodec-51 avformat-52 avdevice-52 avutil-49 swscale-0) SET(FFMPEG_LIBPATH ${FFMPEG}/lib) IF(CMAKE_CL_64) @@ -337,7 +337,7 @@ IF(WIN32) ELSE(CMAKE_CL_64) SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ") ENDIF(CMAKE_CL_64) - SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib ") + SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ") ENDIF(WIN32) IF(APPLE) diff --git a/config/darwin-config.py b/config/darwin-config.py index 8fd6c3251ba..48455d2ce8c 100644 --- a/config/darwin-config.py +++ b/config/darwin-config.py @@ -143,7 +143,6 @@ BF_FTGL_LIB = 'extern_ftgl' WITH_BF_GAMEENGINE='true' WITH_BF_PLAYER='true' -WITH_BF_GLEXT= '1' WITH_BF_ODE = 'false' BF_ODE = LIBDIR + '/ode' diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py index c4fabd9fcd7..02e5dbb7f8f 100644 --- a/config/win32-vc-config.py +++ b/config/win32-vc-config.py @@ -170,7 +170,6 @@ PLATFORM_LINKFLAGS = ''' /NODEFAULTLIB:"libcd.lib" /NODEFAULTLIB:"libcpd.lib" /NODEFAULTLIB:"libcp.lib" - /NODEFAULTLIB:"libcmtd.lib" ''' BF_BUILDDIR = '..\\build\\win32-vc' diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index 00519a5b17f..1d4c753802b 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -59,7 +59,7 @@ #define MEM_MALLOCN_H #include "stdio.h" /* needed for FILE* */ -#include "BLO_sys_types.h" /* needed for intptr_t */ +#include "BLO_sys_types.h" /* needed for uintptr_t */ #ifdef __cplusplus extern "C" { diff --git a/intern/memutil/MEM_Allocator.h b/intern/memutil/MEM_Allocator.h index d5ae94cc6b8..b2c3c5e82e2 100644 --- a/intern/memutil/MEM_Allocator.h +++ b/intern/memutil/MEM_Allocator.h @@ -25,6 +25,7 @@ #define __MEM_Allocator_h_included__ 1 #include "guardedalloc/MEM_guardedalloc.h" +#include "guardedalloc/BLO_sys_types.h" #ifdef _MSC_VER #if _MSC_VER < 1300 // 1200 == VC++ 6.0 according to boost diff --git a/intern/memutil/MEM_CacheLimiter.h b/intern/memutil/MEM_CacheLimiter.h index c9ea0302584..43149efc977 100644 --- a/intern/memutil/MEM_CacheLimiter.h +++ b/intern/memutil/MEM_CacheLimiter.h @@ -61,8 +61,8 @@ class MEM_CacheLimiter; #ifndef __MEM_cache_limiter_c_api_h_included__ extern "C" { - extern void MEM_CacheLimiter_set_maximum(unsigned long m); - extern unsigned long MEM_CacheLimiter_get_maximum(); + extern void MEM_CacheLimiter_set_maximum(intptr_t m); + extern intptr_t MEM_CacheLimiter_get_maximum(); }; #endif @@ -138,9 +138,9 @@ public: delete handle; } void enforce_limits() { - unsigned long max = MEM_CacheLimiter_get_maximum(); - unsigned long mem_in_use= MEM_get_memory_in_use(); - unsigned long mmap_in_use= MEM_get_mapped_memory_in_use(); + intptr_t max = MEM_CacheLimiter_get_maximum(); + intptr_t mem_in_use= MEM_get_memory_in_use(); + intptr_t mmap_in_use= MEM_get_mapped_memory_in_use(); if (max == 0) { return; diff --git a/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp b/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp index 073aff715a3..d998c9a3e80 100644 --- a/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp +++ b/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp @@ -27,18 +27,18 @@ #include "MEM_CacheLimiter.h" #include "MEM_CacheLimiterC-Api.h" -static unsigned long & get_max() +static intptr_t & get_max() { - static unsigned long m = 32*1024*1024; + static intptr_t m = 32*1024*1024; return m; } -void MEM_CacheLimiter_set_maximum(unsigned long m) +void MEM_CacheLimiter_set_maximum(intptr_t m) { get_max() = m; } -unsigned long MEM_CacheLimiter_get_maximum() +intptr_t MEM_CacheLimiter_get_maximum() { return get_max(); } diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index fa8ac9d358c..fb7d59c137a 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -2295,9 +2295,8 @@ void where_is_pose (Object *ob) /* 4. walk over the tree for regular solving */ for(a=0; a<tree->totchannel; a++) { - if(!(tree->pchan[a]->flag & POSE_DONE)) {// successive trees can set the flag + if(!(tree->pchan[a]->flag & POSE_DONE)) // successive trees can set the flag where_is_pose_bone(ob, tree->pchan[a], ctime); - } } /* 5. execute the IK solver */ execute_posetree(ob, tree); diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index abed394c441..1fe6447752e 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -525,7 +525,7 @@ typedef struct UndoElem { char str[FILE_MAXDIR+FILE_MAXFILE]; char name[MAXUNDONAME]; MemFile memfile; - unsigned long undosize; + uintptr_t undosize; } UndoElem; static ListBase undobase={NULL, NULL}; @@ -556,7 +556,7 @@ static int read_undosave(UndoElem *uel) /* name can be a dynamic string */ void BKE_write_undo(char *name) { - unsigned long maxmem, totmem, memused; + uintptr_t maxmem, totmem, memused; int nr, success; UndoElem *uel; @@ -626,7 +626,7 @@ void BKE_write_undo(char *name) if(U.undomemory != 0) { /* limit to maximum memory (afterwards, we can't know in advance) */ totmem= 0; - maxmem= ((unsigned long)U.undomemory)*1024*1024; + maxmem= ((uintptr_t)U.undomemory)*1024*1024; /* keep at least two (original + other) */ uel= undobase.last; diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 16fd0f72b42..01f65b9f324 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -171,20 +171,12 @@ static void cdDM_drawVerts(DerivedMesh *dm) { CDDerivedMesh *cddm = (CDDerivedMesh*) dm; MVert *mv = cddm->mvert; + int i; - if(dm->numVertData) { - glEnableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - - if(G.rt > 1) { - glVertexPointer(3, GL_FLOAT, sizeof(MVert)*G.rt, &mv->co); - glDrawArrays(GL_POINTS, 0, MAX2(1, dm->numVertData/G.rt)); - } - else { - glVertexPointer(3, GL_FLOAT, sizeof(MVert), &mv->co); - glDrawArrays(GL_POINTS, 0, dm->numVertData); - } - } + glBegin(GL_POINTS); + for(i = 0; i < dm->numVertData; i++, mv++) + glVertex3fv(mv->co); + glEnd(); } static void cdDM_drawUVEdges(DerivedMesh *dm) diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 63765048433..4448231b2b4 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -250,7 +250,6 @@ void printvec4f(char *str, float v[4]); void VecAddf(float *v, float *v1, float *v2); void VecSubf(float *v, float *v1, float *v2); void VecLerpf(float *target, float *a, float *b, float t); -void VecLerpf2D(float *target, float *a, float *b, float t); void VecMidf(float *v, float *v1, float *v2); void VecOrthoBasisf(float *v, float *v1, float *v2); @@ -261,6 +260,7 @@ void Vec2Mulf(float *v1, float f); void Vec2Addf(float *v, float *v1, float *v2); void Vec2Subf(float *v, float *v1, float *v2); void Vec2Copyf(float *v1, float *v2); +void Vec2Lerpf(float *target, float *a, float *b, float t); void AxisAngleToQuat(float *q, float *axis, float angle); void vectoquat(float *vec, short axis, short upflag, float *q); diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 108f24bef49..50f8ba0fcde 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -2113,7 +2113,7 @@ void VecLerpf(float *target, float *a, float *b, float t) target[2]= s*a[2] + t*b[2]; } -void VecLerpf2D(float *target, float *a, float *b, float t) +void Vec2Lerpf(float *target, float *a, float *b, float t) { float s = 1.0f-t; diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index fc5de13b57e..4f6730db1f1 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -229,6 +229,7 @@ static int isqtime (char *name) { #endif #ifdef WITH_FFMPEG +extern void do_init_ffmpeg(); void do_init_ffmpeg() { static int ffmpeg_init = 0; diff --git a/source/blender/include/BDR_editface.h b/source/blender/include/BDR_editface.h index 66d81721c46..232017f64d2 100644 --- a/source/blender/include/BDR_editface.h +++ b/source/blender/include/BDR_editface.h @@ -57,6 +57,7 @@ void seam_mark_clear_tface(short mode); int edgetag_shortest_path(struct EditEdge *source, struct EditEdge *target); void edgetag_context_set(struct EditEdge *eed, int val); int edgetag_context_check(struct EditEdge *eed); -void uv_center(float uv[][2], float cent[2], void * isquad); +void uv_center(float uv[][2], float cent[2], void *isquad); + #endif /* BDR_EDITFACE_H */ diff --git a/source/blender/include/BIF_meshtools.h b/source/blender/include/BIF_meshtools.h index 4d542d51289..ee181ba89c9 100644 --- a/source/blender/include/BIF_meshtools.h +++ b/source/blender/include/BIF_meshtools.h @@ -30,6 +30,8 @@ #ifndef BIF_MESHTOOLS_H #define BIF_MESHTOOLS_H +#include "BLO_sys_types.h" + struct Object; struct EditVert; diff --git a/source/blender/include/BSE_view.h b/source/blender/include/BSE_view.h index 7f67309f763..f7afce958f5 100644 --- a/source/blender/include/BSE_view.h +++ b/source/blender/include/BSE_view.h @@ -63,9 +63,9 @@ void window_to_3d(float *vec, short mx, short my); void project_short(float *vec, short *adr); void project_short_noclip(float *vec, short *adr); void project_int(float *vec, int *adr); +void project_int_noclip(float *vec, int *adr); void project_float(float *vec, float *adr); -void viewray(short mval[2], float ray_start[3], float ray_normal[3]); -void viewline(short mval[2], float ray_start[3], float ray_end[3]); +void project_float_noclip(float *vec, float *adr); void viewray(short mval[2], float ray_start[3], float ray_normal[3]); void viewline(short mval[2], float ray_start[3], float ray_end[3]); diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 2aa3e45d773..6c098e220bb 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -26,6 +26,7 @@ * * ***** END GPL LICENSE BLOCK ***** */ + #ifndef DNA_CUSTOMDATA_TYPES_H #define DNA_CUSTOMDATA_TYPES_H diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 1dca1af7650..c92a33bbcbb 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -45,7 +45,6 @@ struct Material; struct ColorBand; struct Group; struct bNodeTree; -struct GPUMaterial; /* WATCH IT: change type? also make changes in ipo.h */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 35a59a7d717..d258cf77ef5 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -53,7 +53,6 @@ struct SoftBody; struct FluidsimSettings; struct ParticleSystem; struct DerivedMesh; -struct GPULamp; typedef struct bDeformGroup { struct bDeformGroup *next, *prev; diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 8a79ce845d7..111dc08ee02 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -367,6 +367,7 @@ typedef struct TexMapping { #define MTEX_BLEND_SAT 11 #define MTEX_BLEND_VAL 12 #define MTEX_BLEND_COLOR 13 +#define MTEX_NUM_BLENDTYPES 14 /* **************** EnvMap ********************* */ diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 949556f4344..53ef51482d7 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -778,6 +778,9 @@ int BPY_run_script(Script *script) PyObject *py_dict, *py_res, *pyarg; Text *text = NULL; BPy_constant *info; + int len; + + FILE *fp = NULL; PyGILState_STATE gilstate = PyGILState_Ensure(); @@ -822,8 +825,12 @@ int BPY_run_script(Script *script) Py_INCREF( Py_None ); pyarg = Py_None; } else { - if (!BLI_exists(script->scriptname)) { - printf( "Script does not exit %s\n", script->scriptname ); + if (BLI_exists(script->scriptname)) { + fp = fopen( script->scriptname, "rb" ); + } + + if( !fp ) { + printf( "Error loading script: couldn't open file %s\n", script->scriptname ); free_libblock( &G.main->script, script ); PyGILState_Release(gilstate); return 0; @@ -868,10 +875,47 @@ int BPY_run_script(Script *script) if (text) { py_res = RunPython( text, py_dict ); } else { - char pystring[sizeof(script->scriptname) + 15]; - pystring[0] = '\0'; - sprintf(pystring, "execfile(r'%s')", script->scriptname); - py_res = PyRun_String( pystring, Py_file_input, py_dict, py_dict ); + /* Previously we used PyRun_File to run directly the code on a FILE + * object, but as written in the Python/C API Ref Manual, chapter 2, + * 'FILE structs for different C libraries can be different and + * incompatible'. + * So now we load the script file data to a buffer */ + char *buffer=NULL, *buffer_ofs=NULL, *b_to, *b_from; + + fseek( fp, 0L, SEEK_END ); + len = ftell( fp ); + fseek( fp, 0L, SEEK_SET ); + + buffer = buffer_ofs = MEM_mallocN( len + 2, "pyfilebuf" ); /* len+2 to add '\n\0' */ + len = fread( buffer, 1, len, fp ); + + buffer[len] = '\n'; /* fix syntax error in files w/o eol */ + buffer[len + 1] = '\0'; + + + /* fast clean-up of dos cr/lf line endings, remove convert '\r\n's to '\n' */ + if (*buffer_ofs == '\r' && *(buffer_ofs+1) == '\n') { + buffer_ofs++; + } + b_from = b_to = buffer_ofs; + + while(*b_from != '\0') { + if (*b_from == '\r' && *( b_from+1 ) == '\n') { + b_from++; + } + if (b_from != b_to) { + *b_to = *b_from; + } + b_to++; + b_from++; + } + *b_to = '\0'; + /* done cleaning the string */ + + fclose( fp ); + + py_res = PyRun_String( buffer_ofs, Py_file_input, py_dict, py_dict ); + MEM_freeN( buffer ); } if( !py_res ) { /* Failed execution of the script */ diff --git a/source/blender/python/api2_2x/Node.c b/source/blender/python/api2_2x/Node.c index 874387b643a..792b2331508 100644 --- a/source/blender/python/api2_2x/Node.c +++ b/source/blender/python/api2_2x/Node.c @@ -1396,7 +1396,7 @@ PyTypeObject Node_Type = { PyObject_HEAD_INIT( NULL ) /* required py macro */ 0, /* ob_size */ /* For printing, in format "<module>.<name>" */ - "Blender.Node.node", /* char *tp_name; */ + "Blender.Node.Scripted", /* char *tp_name; */ sizeof( BPy_Node ), /* int tp_basicsize; */ 0, /* tp_itemsize; For allocation */ diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 1230626700b..5b2bf8a443f 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -475,6 +475,7 @@ void draw_uvs_sima(void) glColor3ub(112, 112, 112); dm = mesh_get_derived_final(OBACT, CD_MASK_BAREMESH|CD_MASK_MTFACE); dm->drawUVEdges(dm); + dm->release(dm); return; } diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index 7577bbb8d51..eef10f74a6a 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -119,6 +119,7 @@ void EM_select_mirrored(void) EditMesh *em = G.editMesh; EditVert *eve, *v1; int a; + for(eve= em->verts.first, a=0; eve; eve= eve->next, a++) { if(eve->f & SELECT) { v1= editmesh_get_x_mirror_vert(G.obedit, eve, a); @@ -4287,9 +4288,8 @@ void vertexsmooth(void) if(eve->f & SELECT) { if(eve->f1) { - if (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR) { + if(G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR) eve_mir= editmesh_get_x_mirror_vert(G.obedit, eve, a); - } adr = eve->tmp.p; fac= 0.5/(float)eve->f1; @@ -4297,8 +4297,7 @@ void vertexsmooth(void) eve->co[0]= 0.5*eve->co[0]+fac*adr[0]; eve->co[1]= 0.5*eve->co[1]+fac*adr[1]; eve->co[2]= 0.5*eve->co[2]+fac*adr[2]; - - + /* clip if needed by mirror modifier */ if (eve->f2) { if (eve->f2 & 1) { diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index aa56d0a7cdb..c2fccb0e50f 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -5213,7 +5213,7 @@ int EdgeSlide(short immediate, float imperc) for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev ); if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) { - VecLerpf2D(uv_tmp, suv->origuv, (perc>=0)?suv->uv_up:suv->uv_down, fabs(perc)); + Vec2Lerpf(uv_tmp, suv->origuv, (perc>=0)?suv->uv_up:suv->uv_down, fabs(perc)); fuv_link = suv->fuv_list; while (fuv_link) { VECCOPY2D(((float *)fuv_link->link), uv_tmp); @@ -5243,7 +5243,7 @@ int EdgeSlide(short immediate, float imperc) for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev ); if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) { - VecLerpf2D(uv_tmp, suv->uv_down, suv->uv_up, fabs(newlen)); + Vec2Lerpf(uv_tmp, suv->uv_down, suv->uv_up, fabs(newlen)); fuv_link = suv->fuv_list; while (fuv_link) { VECCOPY2D(((float *)fuv_link->link), uv_tmp); @@ -5260,7 +5260,7 @@ int EdgeSlide(short immediate, float imperc) for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) { suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev ); if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) { - VecLerpf2D(uv_tmp, suv->uv_up, suv->uv_down, fabs(newlen)); + Vec2Lerpf(uv_tmp, suv->uv_up, suv->uv_down, fabs(newlen)); fuv_link = suv->fuv_list; while (fuv_link) { VECCOPY2D(((float *)fuv_link->link), uv_tmp); diff --git a/source/blender/src/editmode_undo.c b/source/blender/src/editmode_undo.c index adf1c8c7bf1..7893dac2408 100644 --- a/source/blender/src/editmode_undo.c +++ b/source/blender/src/editmode_undo.c @@ -107,7 +107,7 @@ typedef struct UndoElem { Object *ob; // pointer to edited object int type; // type of edited object void *undodata; - unsigned long undosize; + uintptr_t undosize; char name[MAXUNDONAME]; void (*freedata)(void *); void (*to_editmode)(void *); @@ -139,7 +139,7 @@ void undo_editmode_push(char *name, void (*freedata)(void *), { UndoElem *uel; int nr; - unsigned long memused, totmem, maxmem; + uintptr_t memused, totmem, maxmem; /* at first here was code to prevent an "original" key to be insterted twice this was giving conflicts for example when mesh changed due to keys or apply */ @@ -188,7 +188,7 @@ void undo_editmode_push(char *name, void (*freedata)(void *), if(U.undomemory != 0) { /* limit to maximum memory (afterwards, we can't know in advance) */ totmem= 0; - maxmem= ((unsigned long)U.undomemory)*1024*1024; + maxmem= ((uintptr_t)U.undomemory)*1024*1024; uel= undobase.last; while(uel && uel->prev) { diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index 5c8e65917d7..2ac2d5ecc8d 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -39,8 +39,6 @@ #include <config.h> #endif -#include "BLO_sys_types.h" // for intptr_t support - #include "DNA_group_types.h" #include "DNA_ID.h" #include "DNA_image_types.h" diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 2467b8d73d2..979f9fc9df2 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -5814,7 +5814,7 @@ void view3d_buttons(void) uiBlockEndAlign(block); xco+= 10; } - + /* selection modus */ if(G.obedit && (G.obedit->type == OB_MESH)) { uiBlockBeginAlign(block); diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 22cf1b51573..33484500328 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -50,8 +50,6 @@ #endif -#include "BLO_sys_types.h" // for intptr_t support - #include <limits.h> #include "BLI_blenlib.h" diff --git a/source/blender/src/retopo.c b/source/blender/src/retopo.c index 10375e687e2..4768c88e9d8 100644 --- a/source/blender/src/retopo.c +++ b/source/blender/src/retopo.c @@ -798,13 +798,6 @@ void retopo_do_vert(View3D *v3d, float *v) retopo_do_2d(v3d,proj,v,0); } -#if 0 -static int testbase_unselected( void *base ) -{ - return (((Base *)base)->flag & SELECT) ? 0 : 1; -} -#endif - void retopo_do_all() { RetopoViewData *rvd= G.vd->retopo_view_data; @@ -864,68 +857,6 @@ void retopo_do_all() allqueue(REDRAWVIEW3D, 0); } } -#if 0 - else if(retopo_object_check()) { - //if(rvd) { - if (1) { - - /* APRICOT HACK */ - Base *base; - Object *ob; - short s[2]; - View3D *v3d = G.vd; - - /* --- Make external func --- */ - - /* ZBuffer depth vars */ - bglMats mats; - float depth_close= ((float)3.40282347e+38); - int had_depth = 0; - double cent[2], p[3]; - - - persp(PERSP_VIEW); - - /* Get Z Depths, needed for perspective, nice for ortho */ - bgl_get_mats(&mats); - draw_depth(curarea, (void *)G.vd, testbase_unselected); - - /* force updating */ - if (v3d->depths) { - had_depth = 1; - v3d->depths->damaged = 1; - } - - view3d_update_depths(v3d); - - /* we have depths now*/ - for (base=G.scene->base.first; base; base=base->next) { - /* object mode */ - if (TESTBASELIB(base)) { - ob = base->object; - project_short(ob->loc, s); - - if (s[0] != IS_CLIPPED) { - cent[0] = (double)s[0]; - cent[1] = (double)s[1]; - depth_close= v3d->depths->depths[s[1]*v3d->depths->w+s[0]]; - if(depth_close < v3d->depths->depth_range[1] && depth_close > v3d->depths->depth_range[0]) { - if (!gluUnProject(cent[0], cent[1], depth_close, mats.modelview, mats.projection, mats.viewport, &p[0], &p[1], &p[2])) { - /* do nothing */ - } else { - ob->loc[0] = (float)p[0]; - ob->loc[1] = (float)p[1]; - ob->loc[2] = (float)p[2]; - DAG_object_flush_update(G.scene, ob, OB_RECALC); - } - } - } - } - } - // --- - } - } -#endif } void retopo_do_all_cb(void *j1, void *j2) diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index 04aa19bafa3..bf24c02e723 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -2949,9 +2949,9 @@ void do_render_seq(RenderResult *rr, int cfra) (schlaile) */ { - unsigned long mem_in_use; - unsigned long mmap_in_use; - unsigned long max; + uintptr_t mem_in_use; + uintptr_t mmap_in_use; + uintptr_t max; mem_in_use= MEM_get_memory_in_use(); mmap_in_use= MEM_get_mapped_memory_in_use(); diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index f8bbdad5f65..f42e00daf6d 100644 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -881,7 +881,7 @@ void yafrayFileRender_t::writeShader(const string &shader_name, Material* matr, ostr << "\t\t<input value=\"" << shader_name << "_map" << m2 << "\" />\n"; // blendtype, would have been nice if the order would have been the same as for ramps... - const string blendtype[9] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen"}; + const string blendtype[MTEX_NUM_BLENDTYPES] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen", "hue", "sat", "val", "color"}; ostr << "\t\t<mode value=\"" << blendtype[(int)mtex->blendtype] << "\" />\n"; // texture color (for use with MUL and/or no_rgb etc..) diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp index 77d53c4ed96..a7d5653892f 100644 --- a/source/blender/yafray/intern/export_Plugin.cpp +++ b/source/blender/yafray/intern/export_Plugin.cpp @@ -782,7 +782,7 @@ void yafrayPluginRender_t::writeShader(const string &shader_name, Material* matr mparams["input"] = yafray::parameter_t(shader_name + temp); // blendtype, would have been nice if the order would have been the same as for ramps... - const string blendtype[9] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen"}; + const string blendtype[MTEX_NUM_BLENDTYPES] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen", "hue", "sat", "val", "color"}; mparams["mode"] = yafray::parameter_t(blendtype[(int)mtex->blendtype]); // texture color (for use with MUL and/or no_rgb etc..) diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 0ccd0f5095d..1f66335c749 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -469,7 +469,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area, { int exitrequested = KX_EXIT_REQUEST_NO_REQUEST; - //Main* blenderdata = maggie; + Main* blenderdata = maggie; char* startscenename = scenename; char pathname[160]; @@ -488,10 +488,10 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area, // get some preferences SYS_SystemHandle syshandle = SYS_GetSystem(); - //bool properties = (SYS_GetCommandLineInt(syshandle, "show_properties", 0) != 0); - //bool usefixed = (SYS_GetCommandLineInt(syshandle, "fixedtime", 0) != 0); - //bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0); - //bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); + bool properties = (SYS_GetCommandLineInt(syshandle, "show_properties", 0) != 0); + bool usefixed = (SYS_GetCommandLineInt(syshandle, "fixedtime", 0) != 0); + bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0); + bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); bool game2ipo = true;//(SYS_GetCommandLineInt(syshandle, "game2ipo", 0) != 0); bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0); bool usemat = false; diff --git a/source/gameengine/BlenderRoutines/Makefile b/source/gameengine/BlenderRoutines/Makefile index 2a9ff16ebc2..4b9a2a3af17 100644 --- a/source/gameengine/BlenderRoutines/Makefile +++ b/source/gameengine/BlenderRoutines/Makefile @@ -73,9 +73,5 @@ ifeq ($(OS),windows) CPPFLAGS += -I../../blender endif -ifeq ($(WITH_BF_GLEXT),true) - CPPFLAGS += -DWITH_GLEXT -endif - CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript index 3548354c16b..78adbc83d9b 100644 --- a/source/gameengine/BlenderRoutines/SConscript +++ b/source/gameengine/BlenderRoutines/SConscript @@ -26,7 +26,4 @@ cxxflags = [] if env['OURPLATFORM']=='win32-vc': cxxflags.append ('/GR') -if env['WITH_BF_GLEXT'] == 1: - env['CPPFLAGS'].append('-DWITH_GLEXT') - env.BlenderLib ( 'bf_bloutines', sources, Split(incs), [], libtype=['game', 'game2', 'player'], priority=[0, 0, 55] , compileflags=cxxflags) diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index ea45d717616..f9fb5c7ed8d 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -1,5 +1,5 @@ /** -* $Id: BL_ShapeActionActuator.cpp 15261 2008-06-18 07:03:47Z ben2610 $ +* $Id: BL_ShapeActionActuator.cpp 16098 2008-08-14 03:23:36Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp index 6a09c4ba951..e9f6da6544a 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.cpp +++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp @@ -1,5 +1,5 @@ /** - * $Id: BL_ShapeDeformer.cpp 15261 2008-06-18 07:03:47Z ben2610 $ + * $Id: BL_ShapeDeformer.cpp 15607 2008-07-16 21:24:54Z ben2610 $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/gameengine/Converter/BL_ShapeDeformer.h b/source/gameengine/Converter/BL_ShapeDeformer.h index 2d373f6c317..a64a000e6db 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.h +++ b/source/gameengine/Converter/BL_ShapeDeformer.h @@ -1,5 +1,5 @@ /** - * $Id: BL_ShapeDeformer.h 15261 2008-06-18 07:03:47Z ben2610 $ + * $Id: BL_ShapeDeformer.h 15517 2008-07-10 12:47:20Z blendix $ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 83a26f39dcd..1f5b578d441 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -200,7 +200,6 @@ Scene *KX_BlenderSceneConverter::GetBlenderSceneForName(const STR_String& name) return (Scene*)m_maggie->scene.first; } - #include "KX_PythonInit.h" #ifdef USE_BULLET diff --git a/source/gameengine/GamePlayer/common/Makefile b/source/gameengine/GamePlayer/common/Makefile index d54413564cb..6a12e659be6 100644 --- a/source/gameengine/GamePlayer/common/Makefile +++ b/source/gameengine/GamePlayer/common/Makefile @@ -73,10 +73,6 @@ CPPFLAGS += -I../../../gameengine/Rasterizer/RAS_OpenGLRasterizer CPPFLAGS += -I../../../gameengine/Physics/Sumo CPPFLAGS += -I../../../gameengine/Physics/common -ifeq ($(WITH_BF_GLEXT),true) - CPPFLAGS += -DWITH_GLEXT -endif - ############################### SOURCEDIR = source/gameengine/GamePlayer/common diff --git a/source/gameengine/GamePlayer/ghost/Makefile b/source/gameengine/GamePlayer/ghost/Makefile index abd63019750..0b187791734 100644 --- a/source/gameengine/GamePlayer/ghost/Makefile +++ b/source/gameengine/GamePlayer/ghost/Makefile @@ -81,7 +81,3 @@ CPPFLAGS += -I$(NAN_STRING)/include CPPFLAGS += -I$(NAN_GHOST)/include CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) -ifeq ($(WITH_BF_GLEXT),true) - CPPFLAGS += -DWITH_GLEXT -endif - diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index 011944d6a13..33cf07b6211 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -49,8 +49,5 @@ cflags = [] if env['OURPLATFORM']=='win32-vc': cflags = ['/GR'] -if env['WITH_BF_GLEXT'] == 1: - env['CPPFLAGS'].append('-DWITH_GLEXT') - env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = [], libtype='player',priority=0, compileflags=cflags) diff --git a/source/gameengine/Ketsji/Makefile b/source/gameengine/Ketsji/Makefile index 8900c2e83ba..8dd9f1e1c79 100644 --- a/source/gameengine/Ketsji/Makefile +++ b/source/gameengine/Ketsji/Makefile @@ -66,11 +66,6 @@ CPPFLAGS += -I../../blender/imbuf CPPFLAGS += -I../../blender/gpu CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include -ifeq ($(WITH_BF_GLEXT),true) - CPPFLAGS += -DWITH_GLEXT -endif - - ########################### SOURCEDIR = source/gameengine/Ketsji diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index f08990df65c..02e7aed82a5 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -39,9 +39,6 @@ if env['OURPLATFORM'] == 'win32-vc': cflags.append('/GR') cflags.append('/Ox') -if env['WITH_BF_GLEXT'] == 1: - env['CPPFLAGS'].append('-DWITH_GLEXT') - incs += ' ' + env['BF_SOLID_INC'] incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_SDL_INC'] diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py index f91b3c594fa..af3d2810553 100644 --- a/source/gameengine/PyDoc/GameLogic.py +++ b/source/gameengine/PyDoc/GameLogic.py @@ -252,4 +252,4 @@ def getBlendFileList(path = "//"): @type path: string @return: A list of filenames, with no directory prefix @rtype: list - """
\ No newline at end of file + """ diff --git a/source/gameengine/Rasterizer/Makefile b/source/gameengine/Rasterizer/Makefile index e3b1f274ee5..917f70c7108 100644 --- a/source/gameengine/Rasterizer/Makefile +++ b/source/gameengine/Rasterizer/Makefile @@ -49,10 +49,6 @@ ifeq ($(OS),darwin) CPPFLAGS += -fpascal-strings endif -ifeq ($(WITH_BF_GLEXT),true) - CPPFLAGS += -DWITH_GLEXT -endif - ############### SOURCEDIR = source/gameengine/Rasterizer diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile index ab385ef6b09..aee485a22be 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile @@ -44,10 +44,8 @@ CPPFLAGS += -I../../../kernel/gen_system CPPFLAGS += -I../../../blender/gpu CPPFLAGS += -I../../BlenderRoutines CPPFLAGS += -I.. + ifeq ($(OS),darwin) CPPFLAGS += -fpascal-strings endif -ifeq ($(WITH_BF_GLEXT),true) - CPPFLAGS += -DWITH_GLEXT -endif diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp index 41de55c3af0..62ee2edb731 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp @@ -669,13 +669,11 @@ void RAS_OpenGLRasterizer::TexCoord(const RAS_TexVert &tv) void RAS_OpenGLRasterizer::IndexPrimitives(RAS_MeshSlot& ms) { - //cout << "OGL index " << endl; IndexPrimitivesInternal(ms, false); } void RAS_OpenGLRasterizer::IndexPrimitivesMulti(RAS_MeshSlot& ms) { - //cout << "OGL index multi " << endl; IndexPrimitivesInternal(ms, true); } diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp index eb2f4610872..2cb3b52adfb 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp @@ -110,8 +110,6 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives(RAS_MeshSlot& ms) RAS_MeshSlot::iterator it; GLenum drawmode; - //cout << "OGL VA index " << endl; - if(!wireframe) glEnableClientState(GL_TEXTURE_COORD_ARRAY); @@ -169,8 +167,6 @@ void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti(RAS_MeshSlot& ms) RAS_MeshSlot::iterator it; GLenum drawmode; - //cout << "OGL VA index multi " << endl; - if(!wireframe) EnableTextures(true); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript index 9eff9939a66..8d46528f7f0 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript @@ -1,9 +1,6 @@ #!/usr/bin/python Import ('env') -if env['WITH_BF_GLEXT'] == 1: - env['CPPFLAGS'].append('-DWITH_GLEXT') - sources = env.Glob('*.cpp') incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines ' diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript index b71d3b1bb26..a024f7e0ee6 100644 --- a/source/gameengine/Rasterizer/SConscript +++ b/source/gameengine/Rasterizer/SConscript @@ -3,9 +3,6 @@ Import ('env') sources = env.Glob('*.cpp') -if env['WITH_BF_GLEXT'] == 1: - env['CPPFLAGS'].append('-DWITH_GLEXT') - incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include #source/gameengine/Expressions #source/blender/blenkernel #source/blender/makesdna' incs += ' ' + env['BF_PYTHON_INC'] diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index 6200d430dd4..424a7c558d7 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -56,9 +56,6 @@ all debug:: # Object Config_Guess DIRectory export OCGDIR = $(NAN_OBJDIR)/$(CONFIG_GUESS) - export WITH_GLEXT?=true - export WITH_BF_GLEXT?=$(WITH_GLEXT) - # Determines what targets are built export WITH_BF_DYNAMICOPENGL ?= true export WITH_BF_STATICOPENGL ?= false diff --git a/tools/btools.py b/tools/btools.py index b790229bd4f..3974d582640 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -51,7 +51,6 @@ def validate_arguments(args, bc): 'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC', 'BF_OPENGL_LINKFLAGS', 'WITH_BF_FTGL', 'BF_FTGL', 'BF_FTGL_INC', 'BF_FTGL_LIB', 'WITH_BF_PLAYER', - 'WITH_BF_GLEXT', 'WITH_BF_BINRELOC', 'CFLAGS', 'CCFLAGS', 'CPPFLAGS', 'REL_CFLAGS', 'REL_CCFLAGS', @@ -292,7 +291,6 @@ def read_opts(cfg, args): ('BF_FTGL_INC', 'FTGL include path', ''), ('BF_FTGL_LIB', 'FTGL libraries', ''), - (BoolOption('WITH_BF_GLEXT', 'Enable GL Extensions', 'true')), (BoolOption('WITH_BF_PLAYER', 'Build blenderplayer if true', 'false')), ('CFLAGS', 'C-compiler flags', ''), |