diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-09-11 14:06:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-09-11 14:06:14 +0400 |
commit | 994f87c4a907eaaa2e1c0315f40850359f096dbc (patch) | |
tree | a1fd9fe78e6b23eb606a878152e7661d2cc4df90 | |
parent | d542ea51147d8b2270aaf4824984d79a47b93fe6 (diff) |
console was trying to execute console_autoexec.py even if it wasnt there
-rw-r--r-- | release/scripts/console.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/release/scripts/console.py b/release/scripts/console.py index d06501b5728..25aafbc1f87 100644 --- a/release/scripts/console.py +++ b/release/scripts/console.py @@ -774,6 +774,7 @@ histIndex = cursor = -1 # How far back from the first letter are we? - in curren # Autoexec, startup code. scriptDir = Get('scriptsdir') +console_autoexec = None if scriptDir: if not scriptDir.endswith(Blender.sys.sep): scriptDir += Blender.sys.sep @@ -788,7 +789,10 @@ if scriptDir: except: cmdBuffer.append(cmdLine('...console_autoexec.py could not write, this is ok', 1, None)) scriptDir = None # make sure we only use this for console_autoexec.py - + + if not sys.exists(console_autoexec): + console_autoexec = None + else: cmdBuffer.append(cmdLine('...Using existing console_autoexec.py in scripts dir', 1, None)) @@ -811,7 +815,7 @@ def include_console(includeFile): exec('%s%s' % ('__CONSOLE_VAR_DICT__["bpy"]=', 'bpy')) -if scriptDir: +if scriptDir and console_autoexec: include_console(console_autoexec) # pass the blender module #-end autoexec-----------------------------------------------------------------# |