Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2004-07-16 07:08:43 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2004-07-16 07:08:43 +0400
commit97bba404fbf97d247d0b6623c7a38f46247afddb (patch)
tree9a881f85bb539508ff184a95d4e50b3db1ae8436 /source/creator
parent146021ea2eba641285167814dae99cef79d7d419 (diff)
Demo mode and BPython:
- small additions and fixes to enable the demo mode; - Added sleep() to Blender.sys and 17 new functions to Blender.Window module: things to help demo script writing and as a bonus read / write access to Blender's input event queue; - updates in docs, those interested please check Window.py in python/api2_2x/doc/ to read about the new Blender.Window functions. ---- Demo mode should be working well now for (I) playing rt animation -- aka ALT+A -- and (II) rendering pics and anims and playing anims. I'll still add access to radiosity data and functions. PS: Joseph Gilbert made (II) possible with the Scene.Render module he added for 2.32. He's been coding great things for bpython, so I'd like to take the chance to point that and thank him here.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index f95653f7725..63a9c0203fc 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -197,6 +197,7 @@ int main(int argc, char **argv)
int a, i, stax, stay, sizx, sizy;
SYS_SystemHandle syshandle;
Scene *sce;
+ short onload_script = 0;
#if defined(WIN32) || defined (__linux__)
int audio = 1;
@@ -255,7 +256,9 @@ int main(int argc, char **argv)
GEN_init_messaging_system();
/* first test for background */
- G.f |= G_SCENESCRIPT; /* scenescript always set! */
+
+ onload_script = 1; /* scenescript always set! */
+
for(a=1; a<argc; a++) {
/* Handle unix and windows style help requests */
@@ -291,7 +294,7 @@ int main(int argc, char **argv)
break;
case 'y':
- G.f &= ~G_SCENESCRIPT;
+ onload_script = 0;
break;
case 'Y':
@@ -573,6 +576,11 @@ int main(int argc, char **argv)
set_scene(sce);
}
+ /* We set the ONLOAD script global flag here, when the screen has already
+ * been set and the rendering context initialized. If there's an onload
+ * script it will be executed in screenmain. */
+ if (onload_script) G.f |= G_SCENESCRIPT;
+
screenmain();
return 0;