[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12916] trunk/blender/source/blender: More BPyApi (New/2_5x) compiling fixes for mingw.
Joshua Leung
aligorith at gmail.com
Mon Dec 17 07:12:01 CET 2007
Revision: 12916
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12916
Author: aligorith
Date: 2007-12-17 07:12:01 +0100 (Mon, 17 Dec 2007)
Log Message:
-----------
More BPyApi (New/2_5x) compiling fixes for mingw.
* Mostly fixed a few more of the tp_base errors, in the manner that Ken did...
* There's still a weird warning in draw.c about some function being used but not defined
* I've included the source splitting hack here too, as I was getting problems getting it to link the files...
Modified Paths:
--------------
trunk/blender/source/blender/python/BPY_extern.h
trunk/blender/source/blender/python/BPY_interface.c
trunk/blender/source/blender/python/SConscript
trunk/blender/source/blender/python/api2_5x/Draw.c
trunk/blender/source/blender/python/api2_5x/bpy_float.c
trunk/blender/source/blender/python/api2_5x/bpy_gl.c
trunk/blender/source/blender/python/api2_5x/bpy_list.c
trunk/blender/source/blender/python/api2_5x/layer_set.c
trunk/blender/source/blender/src/editarmature.c
Modified: trunk/blender/source/blender/python/BPY_extern.h
===================================================================
--- trunk/blender/source/blender/python/BPY_extern.h 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/BPY_extern.h 2007-12-17 06:12:01 UTC (rev 12916)
@@ -124,6 +124,8 @@
void BPY_spacescript_do_pywin_draw( struct SpaceScript *sc );
void BPY_spacescript_do_pywin_event( struct SpaceScript *sc,
unsigned short event, short val, char ascii );
+ void BPY_spacescript_do_pywin_event( struct SpaceScript *sc,
+ unsigned short event, short val, char ascii );
void BPY_clear_script( struct Script *script );
void BPY_free_finished_script( struct Script *script );
Modified: trunk/blender/source/blender/python/BPY_interface.c
===================================================================
--- trunk/blender/source/blender/python/BPY_interface.c 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/BPY_interface.c 2007-12-17 06:12:01 UTC (rev 12916)
@@ -46,6 +46,7 @@
#include "BKE_object.h" /* during_scriptlink() */
#include "BKE_text.h"
#include "BKE_constraint.h" /* for bConstraintOb */
+#include "BKE_idprop.h"
#include "DNA_curve_types.h" /* for struct IpoDriver */
#include "DNA_ID.h" /* ipo driver */
Modified: trunk/blender/source/blender/python/SConscript
===================================================================
--- trunk/blender/source/blender/python/SConscript 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/SConscript 2007-12-17 06:12:01 UTC (rev 12916)
@@ -3,6 +3,20 @@
sources = Split('BPY_interface.c BPY_menus.c') + env.Glob('api2_5x/*.c')
+if env['BF_SPLIT_SRC'] == 1:
+ numobj = len(sources)
+ maxobj = 30
+
+ numlibs = numobj / maxobj
+ if (numobj % maxobj):
+ numlibs = numlibs + 1
+ subsources = []
+
+ if (env['OURPLATFORM'] == 'win32-mingw'):
+ for i in range(numlibs - 1):
+ subsources.append(sources[i*maxobj:(i+1)*maxobj])
+ subsources.append(sources[(numlibs-1)*maxobj:])
+
incs = 'api2_5x ../blenkernel ../blenlib ../blenloader'
incs += ' ../render/extern/include ../radiosity/extern/include'
incs += ' ../makesdna #intern/guardedalloc #intern/bmfont ../imbuf ../include'
@@ -28,4 +42,8 @@
sources += env.Glob('api2_4x/*.c')
incs += ' api2_4x'
-env.BlenderLib ( libname='blender_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype=['core','game2'], priority = [60,115] )
+if (env['BF_SPLIT_SRC'] == 1) and (env['OURPLATFORM'] == 'win32-mingw'):
+ for i in range(numlibs):
+ env.BlenderLib ( libname='blender_python%d' % (i), sources = subsources[i], includes = Split(incs), defines = defs, libtype=['core','game2'], priority = [60,115] )
+else:
+ env.BlenderLib ( libname='blender_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype=['core','game2'], priority = [60,115] )
Modified: trunk/blender/source/blender/python/api2_5x/Draw.c
===================================================================
--- trunk/blender/source/blender/python/api2_5x/Draw.c 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/api2_5x/Draw.c 2007-12-17 06:12:01 UTC (rev 12916)
@@ -1100,7 +1100,6 @@
But it works anyway.
XXX This is condemned to be dinosource in future - it's a hack.
*/
-extern void spacescript_do_pywin_buttons( SpaceScript * sc, unsigned short event ); /* moved to BPY_interface.c */
static void py_slider_update( void *butv, void *data2_unused )
{
uiBut *but = butv;
Modified: trunk/blender/source/blender/python/api2_5x/bpy_float.c
===================================================================
--- trunk/blender/source/blender/python/api2_5x/bpy_float.c 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/api2_5x/bpy_float.c 2007-12-17 06:12:01 UTC (rev 12916)
@@ -148,7 +148,7 @@
PyObject *BPyFloatType_Init( void )
{
- PyFloat_Type.tp_base = &PyFloat_Type;
+ BPyFloat_Type.tp_base = &PyFloat_Type;
PyType_Ready( &BPyFloat_Type );
return (PyObject *) &BPyFloat_Type;
}
Modified: trunk/blender/source/blender/python/api2_5x/bpy_gl.c
===================================================================
--- trunk/blender/source/blender/python/api2_5x/bpy_gl.c 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/api2_5x/bpy_gl.c 2007-12-17 06:12:01 UTC (rev 12916)
@@ -299,7 +299,7 @@
}
if (self->ndimensions!=1) {
- BPyGLBufferObject *row= GLBuffer_item(self, i);
+ BPyGLBufferObject *row= (BPyGLBufferObject *)GLBuffer_item(self, i);
int ret;
if (!row) return -1;
Modified: trunk/blender/source/blender/python/api2_5x/bpy_list.c
===================================================================
--- trunk/blender/source/blender/python/api2_5x/bpy_list.c 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/api2_5x/bpy_list.c 2007-12-17 06:12:01 UTC (rev 12916)
@@ -833,7 +833,7 @@
BPyList_methods, /* tp_methods */
0, /* tp_members */
0, /*BPyList_getset,*/ /* tp_getset */
- &PyList_Type, /* tp_base */
+ 0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
@@ -856,7 +856,7 @@
obj = (BPyListObject *)BPyList_Type.tp_new(&BPyList_Type, args, NULL);
BPyList_Type.tp_init((PyObject *)obj, args, NULL);
obj->genlib = genlib;
- obj->type = (char)type;
+ obj->type = *((char *)type);
if (genlib) {/* this is a genlib user */
Py_INCREF(genlib);
}
@@ -877,7 +877,7 @@
* Because that would mean imposing limits on the list being assigned and thats a NONO
* */
PyObject *pyob;
- if (!BPyList_CompatSeq(value, (char)type))
+ if (!BPyList_CompatSeq(value, *((char *)type)))
return ( EXPP_ReturnIntError( PyExc_ValueError, "this type cannot be assigned to a list" ) );
pyob = BPyList_get(genlib, type);
@@ -887,6 +887,7 @@
PyObject *BPyListType_Init( void )
{
+ BPyList_Type.tp_base= &PyList_Type;
PyType_Ready( &BPyList_Type );
return (PyObject *) &BPyList_Type;
}
Modified: trunk/blender/source/blender/python/api2_5x/layer_set.c
===================================================================
--- trunk/blender/source/blender/python/api2_5x/layer_set.c 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/python/api2_5x/layer_set.c 2007-12-17 06:12:01 UTC (rev 12916)
@@ -684,7 +684,7 @@
LayerSet_methods, /* tp_methods */
0, /* tp_members */
0, /*LayerSet_getset,*/ /* tp_getset */
- &PySet_Type, /* tp_base */
+ 0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
@@ -733,6 +733,7 @@
PyObject *LayerSetType_Init( void )
{
+ BPyLayerSet_Type.tp_base= &PySet_Type;
PyType_Ready( &BPyLayerSet_Type );
return (PyObject *) &BPyLayerSet_Type;
}
Modified: trunk/blender/source/blender/src/editarmature.c
===================================================================
--- trunk/blender/source/blender/src/editarmature.c 2007-12-17 04:52:46 UTC (rev 12915)
+++ trunk/blender/source/blender/src/editarmature.c 2007-12-17 06:12:01 UTC (rev 12916)
@@ -261,7 +261,7 @@
if (fBone->parent==eBone)
fBone->parent= eBone->parent;
}
- printf("Warning; removed zero sized bone: %s\n", eBone->name);
+ printf("Warning: removed zero sized bone: %s\n", eBone->name);
BLI_freelinkN (list, eBone);
}
}
More information about the Bf-blender-cvs
mailing list