[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18299] branches/blender2.5/blender/source /blender/makesrna/intern/rna_texture.c: Added more RNA MTex properties

Nicholas Bishop nicholasbishop at gmail.com
Sat Jan 3 22:10:51 CET 2009


Revision: 18299
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18299
Author:   nicholasbishop
Date:     2009-01-03 22:10:48 +0100 (Sat, 03 Jan 2009)

Log Message:
-----------
Added more RNA MTex properties

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c	2009-01-03 20:26:29 UTC (rev 18298)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c	2009-01-03 21:10:48 UTC (rev 18299)
@@ -78,6 +78,13 @@
 		{MTEX_SPHERE, "SPHERE", "Sphere", "Maps with Z as central axis."},
 		{0, NULL, NULL, NULL}};
 
+	static EnumPropertyItem prop_normal_map_space_items[] = {
+		{MTEX_NSPACE_CAMERA, "CAMERA", "Camera", ""},
+		{MTEX_NSPACE_WORLD, "WORLD", "World", ""},
+		{MTEX_NSPACE_OBJECT, "OBJECT", "Object", ""},
+		{MTEX_NSPACE_TANGENT, "TANGENT", "Tangent", ""},
+		{0, NULL, NULL, NULL}};
+
 	srna= RNA_def_struct(brna, "MappingTexture", NULL);
 	RNA_def_struct_sdna(srna, "MTex");
 	RNA_def_struct_ui_text(srna, "MappingTexture", "DOC_BROKEN");
@@ -118,6 +125,55 @@
 	prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_VECTOR);
 	RNA_def_property_ui_range(prop, -100, 100, 10, 2);
 	RNA_def_property_ui_text(prop, "Size", "");
+
+	/* XXX: MTex.colormodel, pmapto, pmaptoneg */
+
+	prop= RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_sdna(prop, NULL, "normapspace");
+	RNA_def_property_enum_items(prop, prop_normal_map_space_items);
+	RNA_def_property_ui_text(prop, "Normal Map Space", "");
+
+	/* XXX: MTex.which_output */
+
+	prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+	RNA_def_property_float_sdna(prop, NULL, "r");
+	RNA_def_property_array(prop, 3);
+	RNA_def_property_ui_text(prop, "Color", "");
+
+	/* XXX: MTex.k */
+
+	prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_VECTOR);
+	RNA_def_property_float_sdna(prop, NULL, "def_var");
+	RNA_def_property_range(prop, 0, 1);
+	RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard.");
+
+	/* XXX: MTex.rt */
+
+	prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_VECTOR);
+	RNA_def_property_float_sdna(prop, NULL, "colfac");
+	RNA_def_property_range(prop, 0, 1);
+	RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values.");
+
+	prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_VECTOR);
+	RNA_def_property_float_sdna(prop, NULL, "norfac");
+	RNA_def_property_range(prop, 0, 25);
+	RNA_def_property_ui_text(prop, "Normal actor", "Amount texture affects normal values.");
+
+	/* XXX: could use a better name/description? */
+	prop= RNA_def_property(srna, "general_factor", PROP_FLOAT, PROP_VECTOR);
+	RNA_def_property_float_sdna(prop, NULL, "varfac");
+	RNA_def_property_range(prop, 0, 1);
+	RNA_def_property_ui_text(prop, "General Factor", "Amount texture affects other values.");
+
+	prop= RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_VECTOR);
+	RNA_def_property_float_sdna(prop, NULL, "dispfac");
+	RNA_def_property_range(prop, 0, 1);
+	RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface.");
+
+	prop= RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_VECTOR);
+	RNA_def_property_float_sdna(prop, NULL, "warpfac");
+	RNA_def_property_range(prop, 0, 1);
+	RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects color values.");
 }
 
 void rna_def_environment_map(BlenderRNA *brna)





More information about the Bf-blender-cvs mailing list