diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-23 07:09:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-23 07:09:13 +0300 |
commit | 3f6f89a06baeb12b64467c8e89d25295a62ed6b2 (patch) | |
tree | 4eacddf9e0698d3992c1e220fbc9227cf4ce0bbf /source/blender/makesdna | |
parent | 3f89322f08f3dc3059161af7fccd9216055c6898 (diff) |
Cleanup: move text.c comments to the struct/flag declarations
Also update/correct some of the comments.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_text_types.h | 17 |
2 files changed, 20 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 31a8d967ccf..1cb42b333c7 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1220,7 +1220,11 @@ typedef struct SpaceText { struct Text *text; - int top, left; + /** Determines at what line the top of the text is displayed. */ + int top; + + /** Determines the horizontal scroll (in columns). */ + int left; char _pad1[4]; short flags; 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 */ |