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>2020-06-23 07:09:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-06-23 07:09:13 +0300
commit3f6f89a06baeb12b64467c8e89d25295a62ed6b2 (patch)
tree4eacddf9e0698d3992c1e220fbc9227cf4ce0bbf /source/blender/makesdna/DNA_text_types.h
parent3f89322f08f3dc3059161af7fccd9216055c6898 (diff)
Cleanup: move text.c comments to the struct/flag declarations
Also update/correct some of the comments.
Diffstat (limited to 'source/blender/makesdna/DNA_text_types.h')
-rw-r--r--source/blender/makesdna/DNA_text_types.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h
index 40ab46aaf03..27663ffcbdd 100644
--- a/source/blender/makesdna/DNA_text_types.h
+++ b/source/blender/makesdna/DNA_text_types.h
@@ -43,7 +43,17 @@ typedef struct TextLine {
typedef struct Text {
ID id;
+ /**
+ * Optional file path, when NULL text is considered internal.
+ * Otherwise this path will be used when saving/reloading.
+ *
+ * When set this is where the file will or has been saved.
+ */
char *filepath;
+
+ /**
+ * Python code object for this text (cached result of #Py_CompileStringObject).
+ */
void *compiled;
int flags;
@@ -58,12 +68,15 @@ typedef struct Text {
#define TXT_TABSIZE 4
-/* text flags */
+/** #Text.flags */
enum {
+ /** Set if the file in run-time differs from the file on disk, or if there is no file on disk. */
TXT_ISDIRTY = 1 << 0,
+ /** When the text hasn't been written to a file. #Text.filepath may be NULL or invalid. */
TXT_ISMEM = 1 << 2,
+ /** Should always be set if the Text is not to be written into the `.blend`. */
TXT_ISEXT = 1 << 3,
- /** Used by space handler scriptlinks. */
+ /** Load the script as a Python module when loading the `.blend` file. */
TXT_ISSCRIPT = 1 << 4,
TXT_FLAG_UNUSED_8 = 1 << 8, /* cleared */