diff options
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 18 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 9 |
2 files changed, 16 insertions, 11 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 2bc7b1e8431..12f61cbb026 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -212,14 +212,16 @@ typedef struct ARegion { #define SCREEN_HANDLER_VERSE 3 /* regiontype, first two are the default set */ -#define RGN_TYPE_WINDOW 0 -#define RGN_TYPE_HEADER 1 -#define RGN_TYPE_CHANNELS 2 -#define RGN_TYPE_TEMPORARY 3 -#define RGN_TYPE_UI 4 -#define RGN_TYPE_TOOLS 5 -#define RGN_TYPE_TOOL_PROPS 6 -#define RGN_TYPE_PREVIEW 7 +enum { + RGN_TYPE_WINDOW = 0, + RGN_TYPE_HEADER, + RGN_TYPE_CHANNELS, + RGN_TYPE_TEMPORARY, + RGN_TYPE_UI, + RGN_TYPE_TOOLS, + RGN_TYPE_TOOL_PROPS, + RGN_TYPE_PREVIEW +}; /* region alignment */ #define RGN_ALIGN_NONE 0 diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 883c77b3faa..5a29eee5cf2 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -23,6 +23,7 @@ */ #include <stdlib.h> +#include <stddef.h> #include "RNA_define.h" #include "RNA_types.h" @@ -37,9 +38,10 @@ EnumPropertyItem region_type_items[] = { {RGN_TYPE_WINDOW, "WINDOW", 0, "Window", ""}, {RGN_TYPE_HEADER, "HEADER", 0, "Header", ""}, {RGN_TYPE_CHANNELS, "CHANNELS", 0, "Channels", ""}, - {RGN_TYPE_TOOLS, "TOOLS", 0, "Tools", ""}, {RGN_TYPE_TEMPORARY, "TEMPORARY", 0, "Temporary", ""}, {RGN_TYPE_UI, "UI", 0, "UI", ""}, + {RGN_TYPE_TOOLS, "TOOLS", 0, "Tools", ""}, + {RGN_TYPE_TOOL_PROPS, "TOOL_PROPS", 0, "Tool Properties", ""}, {RGN_TYPE_PREVIEW, "PREVIEW", 0, "Preview", ""}, {0, NULL, 0, NULL, NULL}}; @@ -154,8 +156,9 @@ static void rna_def_region(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Region ID", "Unique ID for this region."); - prop= RNA_def_property(srna, "type", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "regiontype"); + prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "regiontype"); + RNA_def_property_enum_items(prop, region_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Region Type", "Type of this region."); |