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:
authorM.G. Kishalmi <lmg@kishalmi.net>2011-01-29 14:56:11 +0300
committerM.G. Kishalmi <lmg@kishalmi.net>2011-01-29 14:56:11 +0300
commitc709524dc9a2489c9f0af7107ad5246952d2250f (patch)
tree65cb718e1d05f7fe017272befe8ba5fdb8c9e646 /source/blender/makesrna/intern/rna_material.c
parente7e5fa06301430d8c37b302ca70c45a216bc16cf (diff)
new bumpmapping options for the renderer
oldbump -> original newbump -> compatible *new* -> default (3tap) *new* -> best quality (5tap) the latter two have an option to apply bumpmapping in viewspace - much like displacement mapping objectspace - default (scales with the object) texturespace - much like normal mapping (scales)
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r--source/blender/makesrna/intern/rna_material.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index aecb89a0fee..4c8ed475a8d 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -378,9 +378,17 @@ static void rna_def_material_mtex(BlenderRNA *brna)
static EnumPropertyItem prop_bump_method_items[] = {
{0, "BUMP_ORIGINAL", 0, "Original", ""},
- {MTEX_NEW_BUMP, "BUMP_IMPROVED", 0, "Improved", ""},
+ {MTEX_COMPAT_BUMP, "BUMP_COMPATIBLE", 0, "Compatible", ""},
+ {MTEX_3TAP_BUMP, "BUMP_DEFAULT", 0, "Default", ""},
+ {MTEX_5TAP_BUMP, "BUMP_BEST_QUALITY", 0, "Best Quality", ""},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem prop_bump_space_items[] = {
+ {0, "BUMP_VIEWSPACE", 0, "ViewSpace", ""},
+ {MTEX_BUMP_OBJECTSPACE, "BUMP_OBJECTSPACE", 0, "ObjectSpace", ""},
+ {MTEX_BUMP_TEXTURESPACE, "BUMP_TEXTURESPACE", 0, "TextureSpace", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "Material Texture Slot", "Texture slot for textures in a Material datablock");
@@ -687,6 +695,12 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_bump_method_items);
RNA_def_property_ui_text(prop, "Bump Method", "Method to use for bump mapping");
RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "bump_objectspace", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "texflag");
+ RNA_def_property_enum_items(prop, prop_bump_space_items);
+ RNA_def_property_ui_text(prop, "Bump Space", "Space to apply bump mapping in");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
}
static void rna_def_material_colors(StructRNA *srna)