Apricot Branch
============== Various changes from trunk that were somehow missed with merges, and small code cleanups and fixes.
This commit is contained in:
@@ -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)
|
||||
|
@@ -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'
|
||||
|
@@ -170,7 +170,6 @@ PLATFORM_LINKFLAGS = '''
|
||||
/NODEFAULTLIB:"libcd.lib"
|
||||
/NODEFAULTLIB:"libcpd.lib"
|
||||
/NODEFAULTLIB:"libcp.lib"
|
||||
/NODEFAULTLIB:"libcmtd.lib"
|
||||
'''
|
||||
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
|
@@ -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" {
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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 */
|
||||
|
||||
|
@@ -30,6 +30,8 @@
|
||||
#ifndef BIF_MESHTOOLS_H
|
||||
#define BIF_MESHTOOLS_H
|
||||
|
||||
#include "BLO_sys_types.h"
|
||||
|
||||
struct Object;
|
||||
struct EditVert;
|
||||
|
||||
|
@@ -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]);
|
||||
|
||||
|
@@ -26,6 +26,7 @@
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef DNA_CUSTOMDATA_TYPES_H
|
||||
#define DNA_CUSTOMDATA_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 */
|
||||
|
||||
|
@@ -53,7 +53,6 @@ struct SoftBody;
|
||||
struct FluidsimSettings;
|
||||
struct ParticleSystem;
|
||||
struct DerivedMesh;
|
||||
struct GPULamp;
|
||||
|
||||
typedef struct bDeformGroup {
|
||||
struct bDeformGroup *next, *prev;
|
||||
|
@@ -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 ********************* */
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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 */
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
@@ -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) {
|
||||
|
@@ -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"
|
||||
|
@@ -5814,7 +5814,7 @@ void view3d_buttons(void)
|
||||
uiBlockEndAlign(block);
|
||||
xco+= 10;
|
||||
}
|
||||
|
||||
|
||||
/* selection modus */
|
||||
if(G.obedit && (G.obedit->type == OB_MESH)) {
|
||||
uiBlockBeginAlign(block);
|
||||
|
@@ -50,8 +50,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "BLO_sys_types.h" // for intptr_t support
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
|
@@ -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)
|
||||
|
@@ -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();
|
||||
|
@@ -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..)
|
||||
|
@@ -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..)
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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 *****
|
||||
*
|
||||
|
@@ -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 *****
|
||||
*
|
||||
|
@@ -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 *****
|
||||
*
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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']
|
||||
|
@@ -252,4 +252,4 @@ def getBlendFileList(path = "//"):
|
||||
@type path: string
|
||||
@return: A list of filenames, with no directory prefix
|
||||
@rtype: list
|
||||
"""
|
||||
"""
|
||||
|
@@ -49,10 +49,6 @@ ifeq ($(OS),darwin)
|
||||
CPPFLAGS += -fpascal-strings
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_BF_GLEXT),true)
|
||||
CPPFLAGS += -DWITH_GLEXT
|
||||
endif
|
||||
|
||||
###############
|
||||
|
||||
SOURCEDIR = source/gameengine/Rasterizer
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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 '
|
||||
|
@@ -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']
|
||||
|
@@ -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
|
||||
|
@@ -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', ''),
|
||||
|
Reference in New Issue
Block a user