[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18230] branches/blender2.5/blender/source /blender/makesrna/intern/rna_modifier.c: Added RNA for Curve modifier.
Nicholas Bishop
nicholasbishop at gmail.com
Fri Jan 2 00:32:51 CET 2009
Revision: 18230
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18230
Author: nicholasbishop
Date: 2009-01-02 00:32:49 +0100 (Fri, 02 Jan 2009)
Log Message:
-----------
Added RNA for Curve 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 22:43:58 UTC (rev 18229)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c 2009-01-01 23:32:49 UTC (rev 18230)
@@ -161,10 +161,34 @@
static void rna_def_modifier_curve(BlenderRNA *brna)
{
StructRNA *srna;
+ PropertyRNA *prop;
+ static EnumPropertyItem prop_deform_axis_items[] = {
+ {MOD_CURVE_POSX, "POSX", "X", ""},
+ {MOD_CURVE_POSY, "POSY", "Y", ""},
+ {MOD_CURVE_POSZ, "POSZ", "Z", ""},
+ {MOD_CURVE_NEGX, "NEGX", "-X", ""},
+ {MOD_CURVE_NEGY, "NEGY", "-Y", ""},
+ {MOD_CURVE_NEGZ, "NEGZ", "-Z", ""},
+ {0, NULL, NULL, NULL}};
+
srna= RNA_def_struct(brna, "CurveModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve Modifier.");
RNA_def_struct_sdna(srna, "CurveModifierData");
+
+ 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");
+
+ prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
+
+ prop= RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "defaxis");
+ RNA_def_property_enum_items(prop, prop_deform_axis_items);
+ RNA_def_property_ui_text(prop, "Deform Axis", "The axis that the curve deforms along.");
}
static void rna_def_modifier_build(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list