From 0bd759fddd8943c7051849be4ffe368111ba2c65 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 29 Aug 2012 08:17:38 +0000 Subject: new image operator now allows color grid (before was only grid on/off) --- source/blender/makesrna/RNA_enum_types.h | 1 + source/blender/makesrna/intern/rna_image.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index dd230b7b9f8..b651d4d5e5c 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -57,6 +57,7 @@ extern EnumPropertyItem sequence_modifier_type_items[]; extern EnumPropertyItem image_type_items[]; extern EnumPropertyItem image_color_mode_items[]; extern EnumPropertyItem image_depth_mode_items[]; +extern EnumPropertyItem image_generated_type_items[]; extern EnumPropertyItem color_sets_items[]; diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 03e446c9d91..62a06888613 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -42,6 +42,13 @@ #include "WM_types.h" #include "WM_api.h" +EnumPropertyItem image_generated_type_items[] = { + {IMA_GENTYPE_BLANK, "BLANK", 0, "Blank", "Generate a blank image"}, + {IMA_GENTYPE_GRID, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"}, + {IMA_GENTYPE_GRID_COLOR, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"}, + {0, NULL, 0, NULL, NULL} +}; + static EnumPropertyItem image_source_items[] = { {IMA_SRC_FILE, "FILE", 0, "Single Image", "Single image file"}, {IMA_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"}, @@ -436,12 +443,6 @@ static void rna_def_image(BlenderRNA *brna) {IMA_TYPE_COMPOSITE, "COMPOSITING", 0, "Compositing", ""}, {0, NULL, 0, NULL, NULL} }; - static const EnumPropertyItem prop_generated_type_items[] = { - {0, "BLANK", 0, "Blank", "Generate a blank image"}, - {1, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"}, - {2, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"}, - {0, NULL, 0, NULL, NULL} - }; static const EnumPropertyItem prop_mapping_items[] = { {0, "UV", 0, "UV Coordinates", "Use UV coordinates for mapping the image"}, {IMA_REFLECT, "REFLECTION", 0, "Reflection", "Use reflection mapping for mapping the image"}, @@ -520,7 +521,7 @@ static void rna_def_image(BlenderRNA *brna) /* generated image (image_generated_change_cb) */ prop = RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "gen_type"); - RNA_def_property_enum_items(prop, prop_generated_type_items); + RNA_def_property_enum_items(prop, image_generated_type_items); RNA_def_property_ui_text(prop, "Generated Type", "Generated image type"); RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_generated_update"); -- cgit v1.2.3