Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-10-29 17:27:56 +0300
committerThomas Dinges <blender@dingto.org>2009-10-29 17:27:56 +0300
commitf5d62d885be1b040a3060fd3846ad2c08a05ad99 (patch)
treefb8b1d9786f8820b218fc9dbbb92222f6cd1d733 /source/blender/makesrna/intern/rna_texture.c
parent6f1e9a843ee3ef0a3c51155237c41e88481d2919 (diff)
Fixed [#19735] No normal map button in texture->image pane
Put it into the "Image Sampling" Panel, not sure if its the right location.
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r--source/blender/makesrna/intern/rna_texture.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 3246faa2ecb..c2be65c39d6 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -1060,6 +1060,13 @@ static void rna_def_texture_image(BlenderRNA *brna)
{TEX_REPEAT, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
{TEX_CHECKER, "CHECKER", 0, "Checker", "Causes the image to repeat in checker board pattern"},
{0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_normal_space[] = {
+ {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Extend", ""},
+ {MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""},
+ {MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""},
+ {MTEX_NSPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ImageTexture", "Texture");
RNA_def_struct_ui_text(srna, "Image Texture", "");
@@ -1104,14 +1111,6 @@ static void rna_def_texture_image(BlenderRNA *brna)
rna_def_filter_size_common(srna);
- prop= RNA_def_property(srna, "normal_map", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
- RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for normal mapping");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- /* XXX: mtex->normapspace "Sets space of normal map image" "Normal Space %t|Camera %x0|World %x1|Object %x2|Tangent %x3"
- * not sure why this goes in mtex instead of texture directly? */
-
prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extend");
RNA_def_property_enum_items(prop, prop_image_extension);
@@ -1230,6 +1229,21 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Filter Eccentricity", "Maximum eccentricity. Higher gives less blur at distant/oblique angles, but is also slower.");
RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ /* Normal Map */
+ prop= RNA_def_property(srna, "normal_map", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
+ RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for normal mapping");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ /* not sure why this goes in mtex instead of texture directly? */
+ RNA_def_struct_sdna(srna, "MTex");
+
+ prop= RNA_def_property(srna, "normal_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "normapspace");
+ RNA_def_property_enum_items(prop, prop_normal_space);
+ RNA_def_property_ui_text(prop, "Normal Space", "Sets space of normal map image.");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_plugin(BlenderRNA *brna)