Hello, it is possible to have the option for cmake system?<br><br>Thanks<br><br><div><span class="gmail_quote">2007/12/16, Campbell Barton <<a href="mailto:ideasman42@gmail.com">ideasman42@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Revision: 12908<br> <a href="http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12908">http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12908
</a><br>Author: campbellbarton<br>Date: 2007-12-16 07:50:49 +0100 (Sun, 16 Dec 2007)<br><br>Log Message:<br>-----------<br>* Added an option not to compile the 2.4x api (WITH_PYAPI_V24X for Makefiles and WITH_BF_PYAPI_V24X for scons)
<br>* ghash wasnt being set to null when python stopped and was segfaulting on exit<br><br>Modified Paths:<br>--------------<br> trunk/blender/source/blender/python/BPY_interface.c<br> trunk/blender/source/blender/python/Makefile
<br> trunk/blender/source/blender/python/SConscript<br> trunk/blender/source/nan_definitions.mk<br> trunk/blender/tools/btools.py<br><br>Modified: trunk/blender/source/blender/python/BPY_interface.c<br>===================================================================
<br>--- trunk/blender/source/blender/python/BPY_interface.c 2007-12-16 05:46:24 UTC (rev 12907)<br>+++ trunk/blender/source/blender/python/BPY_interface.c 2007-12-16 06:50:49 UTC (rev 12908)<br>@@ -75,7 +75,9 @@<br> #include "api2_5x/bpy.h" /* for the new "bpy" module */
<br><br> /* old 2.4x api */<br>+#ifdef WITH_PYAPI_V24X<br> #include "api2_4x/Blender.h"<br>+#endif<br><br> /*these next two are for pyconstraints*/<br> #include "api2_5x/IDProp.h"<br>@@ -319,8 +321,10 @@
<br> * support for packages here e.g. import `package.module` */<br><br> static struct _inittab BPyInittab_Modules[] = {<br>+ {"bpy", m_bpy_init},<br>+#ifdef WITH_PYAPI_V24X<br> {"Blender", V24_M_Blender_Init},
<br>- {"bpy", m_bpy_init},<br>+#endif<br> {NULL, NULL}<br> };<br><br>@@ -396,9 +400,9 @@<br> void BPY_idhash_remove(ID *id)<br> {<br> GHash *hash = idhash__internal(id);<br>- if (!hash) /* TODO - Dont allow invalid hashes at all*/
<br>+ if (hash==NULL)<br> return;<br>- printf("remove hash %s\n", id->name);<br>+ //printf("remove hash %s\n", id->name);<br> BLI_ghash_remove(hash, id, NULL, NULL);
<br> }<br><br>@@ -412,10 +416,10 @@<br> {<br> GHash *hash = idhash__internal(id);<br><br>- if (!hash) /* TODO - Dont allow invalid hashes */<br>+ if (hash==NULL)<br> return;<br><br>- printf("invalidate hash %s\n", id->name);
<br>+ //printf("invalidate hash %s\n", id->name);<br> BLI_ghash_remove(hash, id, NULL, genlib_invalidate);<br><br> }<br>@@ -424,7 +428,7 @@<br> void BPY_idhash_add(void *value)<br> {<br> ID *id = ((BPyGenericLibObject *)value)->id;
<br>- printf("adding hash %s\n", id->name);<br>+ //printf("adding hash %s\n", id->name);<br> BLI_ghash_insert(idhash__internal(id), (void *)id, (void *)value);<br> }<br> /* END OF BPY ID HASH */
<br>@@ -536,10 +540,10 @@<br> EXPP_Library_Close( );<br><br> // free id hashes<br>- BLI_ghash_free(bpy_idhash_text, NULL, NULL);<br>- BLI_ghash_free(bpy_idhash_scene, NULL, NULL);<br>- BLI_ghash_free(bpy_idhash_group, NULL, NULL);
<br>- BLI_ghash_free(bpy_idhash_object, NULL, NULL);<br>+ BLI_ghash_free(bpy_idhash_text, NULL, NULL); bpy_idhash_text = NULL;<br>+ BLI_ghash_free(bpy_idhash_scene, NULL, NULL); bpy_idhash_scene = NULL;
<br>+ BLI_ghash_free(bpy_idhash_group, NULL, NULL); bpy_idhash_group = NULL;<br>+ BLI_ghash_free(bpy_idhash_object, NULL, NULL); bpy_idhash_object = NULL;<br><br> return;<br> }<br><br>Modified: trunk/blender/source/blender/python/Makefile
<br>===================================================================<br>--- trunk/blender/source/blender/python/Makefile 2007-12-16 05:46:24 UTC (rev 12907)<br>+++ trunk/blender/source/blender/python/Makefile 2007-12-16 06:50:49 UTC (rev 12908)
<br>@@ -32,6 +32,11 @@<br> # Bounces make to subdirectories.<br><br> SOURCEDIR = source/blender/python<br>-DIRS = api2_4x api2_5x<br><br>+DIRS = api2_5x<br>+<br>+ifeq ($(WITH_PYAPI_V24X), true)<br>+ DIRS += api2_4x<br>
+endif<br>+<br> include nan_subdirs.mk<br><br>Modified: trunk/blender/source/blender/python/SConscript<br>===================================================================<br>--- trunk/blender/source/blender/python/SConscript 2007-12-16 05:46:24 UTC (rev 12907)
<br>+++ trunk/blender/source/blender/python/SConscript 2007-12-16 06:50:49 UTC (rev 12908)<br>@@ -1,9 +1,9 @@<br> #!/usr/bin/python<br> Import ('env')<br><br>-sources = Split('BPY_interface.c BPY_menus.c') +
env.Glob('api2_5x/*.c') + env.Glob('api2_4x/*.c')<br>+sources = Split('BPY_interface.c BPY_menus.c') + env.Glob('api2_5x/*.c')<br><br>-incs = 'api2_5x api2_4x ../blenkernel ../blenlib ../blenloader'
<br>+incs = 'api2_5x ../blenkernel ../blenlib ../blenloader'<br> incs += ' ../render/extern/include ../radiosity/extern/include'<br> incs += ' ../makesdna #intern/guardedalloc #intern/bmfont ../imbuf ../include'
<br> incs += ' ' + env['BF_PYTHON_INC']<br>@@ -23,4 +23,9 @@<br> if env['WITH_BF_FFMPEG'] == 1:<br> defs.append('WITH_FFMPEG')<br><br>+if env['WITH_BF_PYAPI_V24X']==1:<br>+
defs.append('WITH_PYAPI_V24X')<br>+ sources += env.Glob('api2_4x/*.c')<br>+ incs += ' api2_4x'<br>+<br> env.BlenderLib ( libname='blender_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype=['core','game2'], priority = [60,115] )
<br><br>Modified: trunk/blender/source/nan_definitions.mk<br>===================================================================<br>--- trunk/blender/source/nan_definitions.mk 2007-12-16 05:46:24 UTC (rev 12907)<br>+++ trunk/blender/source/nan_definitions.mk 2007-12-16 06:50:49 UTC (rev 12908)
<br>@@ -112,7 +112,8 @@<br><br> export WITH_OPENEXR ?= true<br> export WITH_DDS ?= true<br>-<br>+ export WITH_PYAPI_V24X ?= true<br>+<br> ifeq ($(OS),windows)<br> export NAN_WINTAB ?= $(LCGDIR)/wintab
<br> ifeq ($(FREE_WINDOWS), true)<br><br>Modified: trunk/blender/tools/btools.py<br>===================================================================<br>--- trunk/blender/tools/btools.py 2007-12-16 05:46:24 UTC (rev 12907)
<br>+++ trunk/blender/tools/btools.py 2007-12-16 06:50:49 UTC (rev 12908)<br>@@ -46,7 +46,7 @@<br> 'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
<br> 'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC', 'BF_OPENGL_LINKFLAGS',<br> 'WITH_BF_FTGL', 'BF_FTGL', 'BF_FTGL_INC', 'BF_FTGL_LIB',
<br>- 'WITH_BF_FFMPEG',<br>+ 'WITH_BF_PYAPI_V24X',<br> 'WITH_BF_PLAYER',<br> 'CFLAGS', 'CCFLAGS', 'CPPFLAGS',<br> 'REL_CFLAGS', 'REL_CCFLAGS',
<br>@@ -173,6 +173,7 @@<br> ('BF_FFMPEG_INC', 'FFMPEG includes', ''),<br> ('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),<br><br>+ (BoolOption('WITH_BF_PYAPI_V24X', 'Compile Blender
2.4x python api if true', 'true')),<br><br> (BoolOption('WITH_BF_JPEG', 'Use JPEG if true', 'true')),<br> ('BF_JPEG', 'JPEG base path', ''),<br><br>
<br>_______________________________________________<br>Bf-blender-cvs mailing list<br><a href="mailto:Bf-blender-cvs@blender.org">Bf-blender-cvs@blender.org</a><br><a href="http://lists.blender.org/mailman/listinfo/bf-blender-cvs">
http://lists.blender.org/mailman/listinfo/bf-blender-cvs</a><br></blockquote></div><br>