diff options
author | Julian Eisel <julian@blender.org> | 2020-07-01 18:13:57 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-07-01 18:13:57 +0300 |
commit | 0829cebeb024095c268f190c34daa8ae9a5a224c (patch) | |
tree | 12ee5a4a1c2a32e12eff47c8eb9bb0ed217791c1 /source/blender/makesdna/DNA_text_types.h | |
parent | cfde6ebf450594faa57c4bfeaecff10fe512c91b (diff) | |
parent | 42be3964eb201180f6b0fa1ff6ce43b8c3845bc2 (diff) |
Merge branch 'master' into asset-uuid--archivedasset-uuid--archived
Diffstat (limited to 'source/blender/makesdna/DNA_text_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_text_types.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h index dbd5def74d4..27663ffcbdd 100644 --- a/source/blender/makesdna/DNA_text_types.h +++ b/source/blender/makesdna/DNA_text_types.h @@ -43,10 +43,21 @@ typedef struct TextLine { typedef struct Text { ID id; - char *name; + /** + * 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, nlines; + int flags; + char _pad0[4]; ListBase lines; TextLine *curl, *sell; @@ -57,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 */ |