[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15601] branches/soc-2008-quorn/release/ scripts: Fixed error when scripts were run without a visible Text to work on.

Ian Thompson quornian at googlemail.com
Wed Jul 16 14:56:24 CEST 2008


Revision: 15601
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15601
Author:   quorn
Date:     2008-07-16 14:56:23 +0200 (Wed, 16 Jul 2008)

Log Message:
-----------
Fixed error when scripts were run without a visible Text to work on.

Modified Paths:
--------------
    branches/soc-2008-quorn/release/scripts/textplugin_imports.py
    branches/soc-2008-quorn/release/scripts/textplugin_membersuggest.py
    branches/soc-2008-quorn/release/scripts/textplugin_suggest.py

Modified: branches/soc-2008-quorn/release/scripts/textplugin_imports.py
===================================================================
--- branches/soc-2008-quorn/release/scripts/textplugin_imports.py	2008-07-16 11:48:55 UTC (rev 15600)
+++ branches/soc-2008-quorn/release/scripts/textplugin_imports.py	2008-07-16 12:56:23 UTC (rev 15601)
@@ -18,6 +18,9 @@
 
 def main():
 	txt = bpy.data.texts.active
+	if not txt:
+		return
+	
 	line, c = current_line(txt)
 	
 	# Check we are in a normal context

Modified: branches/soc-2008-quorn/release/scripts/textplugin_membersuggest.py
===================================================================
--- branches/soc-2008-quorn/release/scripts/textplugin_membersuggest.py	2008-07-16 11:48:55 UTC (rev 15600)
+++ branches/soc-2008-quorn/release/scripts/textplugin_membersuggest.py	2008-07-16 12:56:23 UTC (rev 15601)
@@ -18,6 +18,9 @@
 
 def main():
 	txt = bpy.data.texts.active
+	if not txt:
+		return
+	
 	(line, c) = current_line(txt)
 	
 	# Check we are in a normal context

Modified: branches/soc-2008-quorn/release/scripts/textplugin_suggest.py
===================================================================
--- branches/soc-2008-quorn/release/scripts/textplugin_suggest.py	2008-07-16 11:48:55 UTC (rev 15600)
+++ branches/soc-2008-quorn/release/scripts/textplugin_suggest.py	2008-07-16 12:56:23 UTC (rev 15601)
@@ -33,6 +33,9 @@
 
 def main():
 	txt = bpy.data.texts.active
+	if not txt:
+		return
+	
 	(line, c) = current_line(txt)
 	
 	# Check we are in a normal context





More information about the Bf-blender-cvs mailing list