[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17212] branches/harmonic-skeleton: merge 17206:17211

Martin Poirier theeth at yahoo.com
Tue Oct 28 21:26:38 CET 2008


Revision: 17212
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17212
Author:   theeth
Date:     2008-10-28 21:26:38 +0100 (Tue, 28 Oct 2008)

Log Message:
-----------
merge 17206:17211

Modified Paths:
--------------
    branches/harmonic-skeleton/SConstruct
    branches/harmonic-skeleton/blenderplayer/CMakeLists.txt
    branches/harmonic-skeleton/source/blender/SConscript
    branches/harmonic-skeleton/source/blender/blenkernel/SConscript
    branches/harmonic-skeleton/source/blender/blenkernel/intern/constraint.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/depsgraph.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/exotic.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/ipo.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/material.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/object.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/scene.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/script.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/text.c
    branches/harmonic-skeleton/source/blender/blenkernel/intern/world.c
    branches/harmonic-skeleton/source/blender/nodes/SConscript
    branches/harmonic-skeleton/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c
    branches/harmonic-skeleton/source/blender/src/SConscript
    branches/harmonic-skeleton/source/blender/src/buttons_object.c
    branches/harmonic-skeleton/source/blender/src/drawipo.c
    branches/harmonic-skeleton/source/blender/src/drawscript.c
    branches/harmonic-skeleton/source/blender/src/drawtext.c
    branches/harmonic-skeleton/source/blender/src/drawview.c
    branches/harmonic-skeleton/source/blender/src/editconstraint.c
    branches/harmonic-skeleton/source/blender/src/editface.c
    branches/harmonic-skeleton/source/blender/src/editmesh_add.c
    branches/harmonic-skeleton/source/blender/src/editscreen.c
    branches/harmonic-skeleton/source/blender/src/header_image.c
    branches/harmonic-skeleton/source/blender/src/header_info.c
    branches/harmonic-skeleton/source/blender/src/header_oops.c
    branches/harmonic-skeleton/source/blender/src/header_script.c
    branches/harmonic-skeleton/source/blender/src/header_text.c
    branches/harmonic-skeleton/source/blender/src/header_view3d.c
    branches/harmonic-skeleton/source/blender/src/headerbuttons.c
    branches/harmonic-skeleton/source/blender/src/interface.c
    branches/harmonic-skeleton/source/blender/src/renderwin.c
    branches/harmonic-skeleton/source/blender/src/space.c
    branches/harmonic-skeleton/source/blender/src/toolbox.c
    branches/harmonic-skeleton/source/blender/src/usiblender.c
    branches/harmonic-skeleton/source/creator/SConscript
    branches/harmonic-skeleton/source/creator/creator.c
    branches/harmonic-skeleton/tools/Blender.py
    branches/harmonic-skeleton/tools/btools.py

Modified: branches/harmonic-skeleton/SConstruct
===================================================================
--- branches/harmonic-skeleton/SConstruct	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/SConstruct	2008-10-28 20:26:38 UTC (rev 17212)
@@ -277,6 +277,7 @@
     env['WITH_BF_BINRELOC'] = False
     env['BF_BUILDINFO'] = False
     env['BF_NO_ELBEEM'] = True
+    env['WITH_BF_PYTHON'] = False
 
 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
 #B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)

Modified: branches/harmonic-skeleton/blenderplayer/CMakeLists.txt
===================================================================
--- branches/harmonic-skeleton/blenderplayer/CMakeLists.txt	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/blenderplayer/CMakeLists.txt	2008-10-28 20:26:38 UTC (rev 17212)
@@ -104,6 +104,7 @@
     bf_blenlib 
     bf_cineon 
     bf_openexr 
+    bf_dds
     bf_ftfont 
     extern_ftgl 
     bf_readblenfile 

Modified: branches/harmonic-skeleton/source/blender/SConscript
===================================================================
--- branches/harmonic-skeleton/source/blender/SConscript	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/SConscript	2008-10-28 20:26:38 UTC (rev 17212)
@@ -11,13 +11,17 @@
             'imbuf/SConscript',
             'imbuf/intern/cineon/SConscript',
             'makesdna/SConscript',
-            'python/SConscript',
             'radiosity/SConscript',
             'readblenfile/SConscript',
             'render/SConscript',
             'src/SConscript',
             'nodes/SConscript'])
 
+
+
+if env['WITH_BF_PYTHON']:
+    SConscript(['python/SConscript'])
+
 if env['WITH_BF_YAFRAY']:
     SConscript(['yafray/SConscript'])
 

Modified: branches/harmonic-skeleton/source/blender/blenkernel/SConscript
===================================================================
--- branches/harmonic-skeleton/source/blender/blenkernel/SConscript	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/blenkernel/SConscript	2008-10-28 20:26:38 UTC (rev 17212)
@@ -19,8 +19,11 @@
 
 defs = ''
 
+if not env['WITH_BF_PYTHON']:
+	defs += 'DISABLE_PYTHON'
+
 if env['WITH_BF_INTERNATIONAL']:
-	defs += 'WITH_FREETYPE2'
+	defs += ' WITH_FREETYPE2'
 
 if env['WITH_BF_VERSE']:
 	defs += ' WITH_VERSE'
@@ -49,4 +52,7 @@
 if env['WITH_BF_PLAYER']:
     SConscript(['bad_level_call_stubs/SConscript'])
 
+if not env['WITH_BF_PYTHON']:
+	defs += ' DISABLE_PYTHON'
+
 env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = Split(defs), libtype=['core','player'], priority = [65, 20] )

Modified: branches/harmonic-skeleton/source/blender/blenkernel/intern/constraint.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenkernel/intern/constraint.c	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/blenkernel/intern/constraint.c	2008-10-28 20:26:38 UTC (rev 17212)
@@ -64,8 +64,9 @@
 #include "BKE_library.h"
 #include "BKE_idprop.h"
 
-
+#ifndef DISABLE_PYTHON
 #include "BPY_extern.h"
+#endif
 
 #include "blendef.h"
 
@@ -1814,6 +1815,7 @@
 	sizelike_evaluate /* evaluate */
 };
 
+
 /* ----------- Python Constraint -------------- */
 
 static void pycon_free (bConstraint *con)
@@ -1888,8 +1890,10 @@
 		constraint_target_to_mat4(ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
 		
 		/* only execute target calculation if allowed */
+#ifndef DISABLE_PYTHON
 		if (G.f & G_DOSCRIPTLINKS)
 			BPY_pyconstraint_target(data, ct);
+#endif
 	}
 	else if (ct)
 		Mat4One(ct->matrix);
@@ -1897,6 +1901,9 @@
 
 static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
 {
+#ifdef DISABLE_PYTHON
+	return;
+#else
 	bPythonConstraint *data= con->data;
 	
 	/* only evaluate in python if we're allowed to do so */
@@ -1913,6 +1920,7 @@
 	
 	/* Now, run the actual 'constraint' function, which should only access the matrices */
 	BPY_pyconstraint_eval(data, cob, targets);
+#endif /* DISABLE_PYTHON */
 }
 
 static bConstraintTypeInfo CTI_PYTHON = {

Modified: branches/harmonic-skeleton/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenkernel/intern/depsgraph.c	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/blenkernel/intern/depsgraph.c	2008-10-28 20:26:38 UTC (rev 17212)
@@ -79,7 +79,9 @@
 #include "MEM_guardedalloc.h"
 #include "blendef.h"
 
+#ifndef DISABLE_PYTHON
 #include "BPY_extern.h"
+#endif
 
  #include "depsgraph_private.h"
  
@@ -313,6 +315,7 @@
 
 				if ((icu->driver->flag & IPO_DRIVER_FLAG_INVALID) || (icu->driver->name[0] == '\0'))
 					continue; /* empty or invalid expression */
+#ifndef DISABLE_PYTHON
 				else {
 					/* now we need refs to all objects mentioned in this
 					 * pydriver expression, to call 'dag_add_relation'
@@ -334,6 +337,7 @@
 						MEM_freeN(obarray);
 					}
 				}
+#endif /* DISABLE_PYTHON */
 			}
 			else if (icu->driver->ob) {
 				node1 = dag_get_node(dag, icu->driver->ob);

Modified: branches/harmonic-skeleton/source/blender/blenkernel/intern/exotic.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenkernel/intern/exotic.c	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/blenkernel/intern/exotic.c	2008-10-28 20:26:38 UTC (rev 17212)
@@ -117,7 +117,9 @@
 #include "BKE_curve.h"
 #include "BKE_customdata.h"
 
+#ifndef DISABLE_PYTHON
 #include "BPY_extern.h"
+#endif
 
 #include "blendef.h"
 
@@ -2427,6 +2429,7 @@
 						read_stl_mesh_binary(name);
 					retval = 1;
 				}
+#ifndef DISABLE_PYTHON
 				// TODO: this should not be in the kernel...
 				else { // unknown format, call Python importloader 
 					if (BPY_call_importloader(name)) {
@@ -2436,6 +2439,7 @@
 					}	
 				
 				}
+#endif /* DISABLE_PYTHON */
 				waitcursor(0);
 			}
 		}

Modified: branches/harmonic-skeleton/source/blender/blenkernel/intern/ipo.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenkernel/intern/ipo.c	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/blenkernel/intern/ipo.c	2008-10-28 20:26:38 UTC (rev 17212)
@@ -73,7 +73,10 @@
 #include "BKE_main.h"
 #include "BKE_mesh.h"
 #include "BKE_object.h"
+
+#ifndef DISABLE_PYTHON
 #include "BPY_extern.h" /* for BPY_pydriver_eval() */
+#endif
 
 #define SMALL -1.0e-10
 
@@ -1008,6 +1011,7 @@
  */
 static float eval_driver (IpoDriver *driver, float ipotime)
 {
+#ifndef DISABLE_PYTHON
 	/* currently, drivers are either PyDrivers (evaluating a PyExpression, or Object/Pose-Channel transforms) */
 	if (driver->type == IPO_DRIVER_TYPE_PYTHON) {
 		/* check for empty or invalid expression */
@@ -1022,7 +1026,10 @@
 		 */
 		return BPY_pydriver_eval(driver);
 	}
-	else {
+	else
+#endif /* DISABLE_PYTHON */
+	{
+
 		Object *ob= driver->ob;
 		
 		/* must have an object to evaluate */

Modified: branches/harmonic-skeleton/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenkernel/intern/material.c	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/blenkernel/intern/material.c	2008-10-28 20:26:38 UTC (rev 17212)
@@ -59,7 +59,9 @@
 #include "BKE_node.h"
 #include "BKE_utildefines.h"
 
+#ifndef DISABLE_PYTHON
 #include "BPY_extern.h"
+#endif
 
 #include "GPU_material.h"
 
@@ -78,7 +80,9 @@
 	MTex *mtex;
 	int a;
 
+#ifndef DISABLE_PYTHON
 	BPY_free_scriptlink(&ma->scriptlink);
+#endif
 	
 	for(a=0; a<MAX_MTEX; a++) {
 		mtex= ma->mtex[a];
@@ -201,8 +205,10 @@
 			id_us_plus((ID *)man->mtex[a]->tex);
 		}
 	}
-	
+
+#ifndef DISABLE_PYTHON	
 	BPY_copy_scriptlink(&ma->scriptlink);
+#endif
 	
 	if(ma->ramp_col) man->ramp_col= MEM_dupallocN(ma->ramp_col);
 	if(ma->ramp_spec) man->ramp_spec= MEM_dupallocN(ma->ramp_spec);

Modified: branches/harmonic-skeleton/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenkernel/intern/object.c	2008-10-28 20:19:25 UTC (rev 17211)
+++ branches/harmonic-skeleton/source/blender/blenkernel/intern/object.c	2008-10-28 20:26:38 UTC (rev 17212)
@@ -111,7 +111,9 @@
 
 #include "LBM_fluidsim.h"
 
+#ifndef DISABLE_PYTHON
 #include "BPY_extern.h"
+#endif
 
 #include "GPU_material.h"
 
@@ -269,8 +271,10 @@
 	free_constraints(&ob->constraints);
 	free_constraint_channels(&ob->constraintChannels);
 	free_nlastrips(&ob->nlastrips);
-	
+
+#ifndef DISABLE_PYTHON	
 	BPY_free_scriptlink(&ob->scriptlink);
+#endif
 	
 	if(ob->pd){
 		if(ob->pd->tex)
@@ -637,9 +641,9 @@
 	
 	camn= copy_libblock(cam);
 	id_us_plus((ID *)camn->ipo);
-
+#ifndef DISABLE_PYTHON
 	BPY_copy_scriptlink(&camn->scriptlink);
-	
+#endif	
 	return camn;
 }
 
@@ -786,9 +790,9 @@
 	id_us_plus((ID *)lan->ipo);
 
 	if (la->preview) lan->preview = BKE_previewimg_copy(la->preview);
-
+#ifndef DISABLE_PYTHON
 	BPY_copy_scriptlink(&la->scriptlink);
-	
+#endif
 	return lan;
 }
 
@@ -846,7 +850,9 @@
 
 void free_camera(Camera *ca)
 {
+#ifndef DISABLE_PYTHON
 	BPY_free_scriptlink(&ca->scriptlink);
+#endif
 }
 
 void free_lamp(Lamp *la)
@@ -855,8 +861,9 @@
 	int a;
 
 	/* scriptlinks */
-		
+#ifndef DISABLE_PYTHON
 	BPY_free_scriptlink(&la->scriptlink);
+#endif
 
 	for(a=0; a<MAX_MTEX; a++) {
 		mtex= la->mtex[a];
@@ -1202,9 +1209,9 @@
 		modifier_copyData(md, nmd);
 		BLI_addtail(&obn->modifiers, nmd);
 	}
-	
+#ifndef DISABLE_PYTHON	
 	BPY_copy_scriptlink(&ob->scriptlink);
-	
+#endif
 	obn->prop.first = obn->prop.last = NULL;
 	copy_properties(&obn->prop, &ob->prop);
 	
@@ -1918,10 +1925,11 @@
 		
 		constraints_clear_evalob(cob);
 	}
-	
+#ifndef DISABLE_PYTHON
 	if(ob->scriptlink.totscript && !during_script()) {
 		if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript((ID *)ob, SCRIPT_REDRAW);
 	}
+#endif
 	
 	/* set negative scale flag in object */
 	Crossf(vec, ob->obmat[0], ob->obmat[1]);
@@ -2288,7 +2296,9 @@
 			}
 			else
 				where_is_object(ob);
+#ifndef DISABLE_PYTHON
 			if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript((ID *)ob, SCRIPT_OBJECTUPDATE);
+#endif
 		}
 		

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list