[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29408] trunk/blender: [#22554] Register option on Texts doesn't work anymore

Campbell Barton ideasman42 at gmail.com
Fri Jun 11 16:10:02 CEST 2010


Revision: 29408
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29408
Author:   campbellbarton
Date:     2010-06-11 16:10:02 +0200 (Fri, 11 Jun 2010)

Log Message:
-----------
[#22554] Register option on Texts doesn't work anymore
there were no hints that '.py' extension is needed, added tooltip.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_text.py
    trunk/blender/source/blender/makesrna/intern/rna_text.c

Modified: trunk/blender/release/scripts/ui/space_text.py
===================================================================
--- trunk/blender/release/scripts/ui/space_text.py	2010-06-11 13:45:58 UTC (rev 29407)
+++ trunk/blender/release/scripts/ui/space_text.py	2010-06-11 14:10:02 UTC (rev 29408)
@@ -54,6 +54,9 @@
         if text:
             row = layout.row()
             row.operator("text.run_script")
+
+            row = layout.row()
+            row.active = text.name.endswith(".py")
             row.prop(text, "use_module")
 
             row = layout.row()
@@ -63,10 +66,7 @@
                 else:
                     row.label(text="File: %s" % text.filepath)
             else:
-                if text.library:
-                    row.label(text="Text: External")
-                else:
-                    row.label(text="Text: Internal")
+                row.label(text="Text: External" if text.library else "Text: Internal")
 
 
 class TEXT_PT_properties(bpy.types.Panel):

Modified: trunk/blender/source/blender/makesrna/intern/rna_text.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_text.c	2010-06-11 13:45:58 UTC (rev 29407)
+++ trunk/blender/source/blender/makesrna/intern/rna_text.c	2010-06-11 14:10:02 UTC (rev 29408)
@@ -195,7 +195,7 @@
 	
 	prop= RNA_def_property(srna, "use_module", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISSCRIPT);
-	RNA_def_property_ui_text(prop, "Register", "Register this text as a module on loading");
+	RNA_def_property_ui_text(prop, "Register", "Register this text as a module on loading, Text name must end with \".py\"");
 
 	prop= RNA_def_property(srna, "tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_TABSTOSPACES);





More information about the Bf-blender-cvs mailing list