diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 17:28:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 17:28:11 +0400 |
commit | 5c60b12ecd186e25c578d2b503251bb10910a228 (patch) | |
tree | a2d30b5114d723bc5683d7827327b83319eecaa8 /system_demo_mode | |
parent | e568fa921316e508a6441fc86a2bfe02f3d4aff3 (diff) |
pressing play didnt give any errors when no config was found.
Diffstat (limited to 'system_demo_mode')
-rw-r--r-- | system_demo_mode/demo_mode.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/system_demo_mode/demo_mode.py b/system_demo_mode/demo_mode.py index e3e26b87..29e8bf32 100644 --- a/system_demo_mode/demo_mode.py +++ b/system_demo_mode/demo_mode.py @@ -375,15 +375,20 @@ class DemoMode(bpy.types.Operator): def execute(self, context): print("func:DemoMode.execute:", len(global_config_files), "files") + use_temp = False + # load config if not loaded if not global_config_files: load_config() - demo_mode_temp_file() # play this once through then never again + use_temp = True if not global_config_files: self.report({'INFO'}, "No configuration found with text or file: %s. Run File -> Demo Mode Setup" % DEMO_CFG) return {'CANCELLED'} + if use_temp: + demo_mode_temp_file() # play this once through then never again + # toggle if DemoMode.enabled and DemoMode.first_run == False: # this actually cancells the previous running instance |