diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 17:20:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 17:20:23 +0400 |
commit | e568fa921316e508a6441fc86a2bfe02f3d4aff3 (patch) | |
tree | f92cd3e26cc1d8de677a934add7c552038e0ae81 /system_demo_mode/__init__.py | |
parent | 6aeb74120ce436c42028369d5c77fdef3559b2a7 (diff) |
Option to exit once demo loop plays through.
Diffstat (limited to 'system_demo_mode/__init__.py')
-rw-r--r-- | system_demo_mode/__init__.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/system_demo_mode/__init__.py b/system_demo_mode/__init__.py index d90c549c..39f72110 100644 --- a/system_demo_mode/__init__.py +++ b/system_demo_mode/__init__.py @@ -80,6 +80,11 @@ class DemoModeSetup(bpy.types.Operator): description="Run demo immediately", default=True, ) + exit = BoolProperty( + name="Exit", + description="Run once and exit", + default=False, + ) # these are mapped directly to the config! # @@ -134,8 +139,11 @@ class DemoModeSetup(bpy.types.Operator): def execute(self, context): from . import config - keywords = self.as_keywords(ignore=("filepath", "random_order", "run")) - cfg_str, dirpath = config.as_string(self.filepath, self.random_order, **keywords) + keywords = self.as_keywords(ignore=("filepath", "random_order", "run", "exit")) + cfg_str, dirpath = config.as_string(self.filepath, + self.random_order, + self.exit, + **keywords) text = bpy.data.texts.get("demo.py") if text: text.name += ".back" @@ -163,6 +171,7 @@ class DemoModeSetup(bpy.types.Operator): box.label("Writes: demo.py config text") layout.prop(self, "run") + layout.prop(self, "exit") layout.label("Generate Settings:") row = layout.row() |