diff options
author | Julian Eisel <julian@blender.org> | 2020-12-08 17:43:15 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-08 17:43:15 +0300 |
commit | 9962e5936dd2e58319c01beb6b5392169627cfd8 (patch) | |
tree | 490e96995a518855473e1e2648cee900895214f7 | |
parent | 2678953f699c27122d059eb8ab14e84a5be75c28 (diff) |
Cleanup: Use enum for file selection type definitions
Makes it more clear that these belong together and allows using the enum type
rather than just `int`.
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index a554caccc4e..6fd112628a1 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -698,7 +698,7 @@ typedef struct FileSelectParams { /* short */ /** XXXXX for now store type here, should be moved to the operator. */ - short type; + short type; /* eFileSelectType */ /** Settings for filter, hiding dots files. */ short flag; /** Sort order. */ @@ -807,12 +807,14 @@ enum eFileDetails { #define FILE_MAX_LIBEXTRA (FILE_MAX + MAX_ID_NAME) /* filesel types */ -#define FILE_UNIX 8 -#define FILE_BLENDER 8 /* don't display relative paths */ -#define FILE_SPECIAL 9 - -#define FILE_LOADLIB 1 -#define FILE_MAIN 2 +typedef enum eFileSelectType { + FILE_LOADLIB = 1, + FILE_MAIN = 2, + + FILE_UNIX = 8, + FILE_BLENDER = 8, /* don't display relative paths */ + FILE_SPECIAL = 9, +} eFileSelectType; /* filesel op property -> action */ typedef enum eFileSel_Action { |