Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-18 15:45:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-18 16:00:43 +0300
commitdc8dd24351462e73c5d0260564aad9cd56fd6c33 (patch)
tree1bed91a568c961f5d65ef44e4e8f17c9d9259a27 /source/blender/makesrna/intern/rna_text.c
parent6f087be9f97d6e4b8637b297322438cf23491cae (diff)
PyAPI: remove support for importing text blocks as modules
Allowing direct import of text blocks isn't especially useful, instead add `text.as_module()` script authors can do this explicitly if it's needed. Now the text "Register" option executes instead of loading as a module. This removes the need to keep track of the current Main, and C code to override Python's import & reload.
Diffstat (limited to 'source/blender/makesrna/intern/rna_text.c')
-rw-r--r--source/blender/makesrna/intern/rna_text.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 5b75937ce72..589f7818b68 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -172,9 +172,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, Text name must end with \".py\"");
+ prop, "Register", "Run this text as a script on loading, Text name must end with \".py\"");
prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_TABSTOSPACES);