[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28836] trunk/blender/source/blender/ python/intern/bpy_app.c: bpy.app. background - so a python script can check if blender is running without a UI

Campbell Barton ideasman42 at gmail.com
Tue May 18 17:57:51 CEST 2010


Revision: 28836
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28836
Author:   campbellbarton
Date:     2010-05-18 17:57:51 +0200 (Tue, 18 May 2010)

Log Message:
-----------
bpy.app.background - so a python script can check if blender is running without a UI

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_app.c

Modified: trunk/blender/source/blender/python/intern/bpy_app.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_app.c	2010-05-18 15:43:11 UTC (rev 28835)
+++ trunk/blender/source/blender/python/intern/bpy_app.c	2010-05-18 15:57:51 UTC (rev 28836)
@@ -46,6 +46,7 @@
 	{"home", "The blender home directory, normally matching $HOME"},
 	{"binary_path", "The location of blenders executable, useful for utilities that spawn new instances"},
 	{"debug", "Boolean, set when blender is running in debug mode (started with -d)"},
+	{"background", "Boolean, True when blender is running without a user interface (started with -b)"},
 
 	/* buildinfo */
 	{"build_date", "The date this blender instance was built"},
@@ -87,6 +88,7 @@
 	SetStrItem(BLI_gethome());
 	SetStrItem(bprogname);
 	SetObjItem(PyBool_FromLong(G.f & G_DEBUG));
+	SetObjItem(PyBool_FromLong(G.background));
 
 	/* build info */
 #ifdef BUILD_DATE





More information about the Bf-blender-cvs mailing list