[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18232] branches/blender2.5/blender/source /blender/makesrna/intern/rna_modifier.c: Added RNA for decimate modifier.

Nicholas Bishop nicholasbishop at gmail.com
Fri Jan 2 00:47:32 CET 2009


Revision: 18232
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18232
Author:   nicholasbishop
Date:     2009-01-02 00:47:32 +0100 (Fri, 02 Jan 2009)

Log Message:
-----------
Added RNA for decimate modifier.

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

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c	2009-01-01 23:45:56 UTC (rev 18231)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c	2009-01-01 23:47:32 UTC (rev 18232)
@@ -179,7 +179,7 @@
 	prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
 	RNA_def_property_pointer_sdna(prop, NULL, "object");
 	RNA_def_property_struct_type(prop, "ID");
-	RNA_def_property_ui_text(prop, "Curve", "Curve object to deform with");
+	RNA_def_property_ui_text(prop, "Curve", "Curve object to deform with.");
 
 	prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "name");
@@ -262,17 +262,26 @@
 	RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob");
 	RNA_def_property_struct_type(prop, "ID");
 	RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror.");
-
-	
 }
 
 static void rna_def_modifier_decimate(BlenderRNA *brna)
 {
 	StructRNA *srna;
+	PropertyRNA *prop;
 
 	srna= RNA_def_struct(brna, "DecimateModifier", "Modifier");
 	RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimate Modifier.");
 	RNA_def_struct_sdna(srna, "DecimateModifierData");
+
+	prop= RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_float_sdna(prop, NULL, "percent");
+	RNA_def_property_range(prop, 0, 1);
+	RNA_def_property_ui_text(prop, "Ratio", "Defines the ratio of triangles to reduce to.");
+
+	prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "faceCount");
+	RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+	RNA_def_property_ui_text(prop, "Face Count", "The current number of faces in the decimated mesh.");
 }
 
 static void rna_def_modifier_wave(BlenderRNA *brna)





More information about the Bf-blender-cvs mailing list