diff --git a/release/scripts/ui/space_text.py b/release/scripts/ui/space_text.py index 1eca1a9e05c..692f1581bd6 100644 --- a/release/scripts/ui/space_text.py +++ b/release/scripts/ui/space_text.py @@ -54,6 +54,9 @@ class TEXT_HT_header(bpy.types.Header): 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 @@ class TEXT_HT_header(bpy.types.Header): 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): diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index ccd3b432163..d8651e5d05d 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -195,7 +195,7 @@ static void rna_def_text(BlenderRNA *brna) 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);