diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-01-02 02:32:49 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-01-02 02:32:49 +0300 |
commit | 990ac1477dfd4d9648b817c3a65df518e57388c4 (patch) | |
tree | e10e7d83f7c401e54c71856df3648213ea509581 /source/blender | |
parent | b01c390d23bf894604e2a6e23afd3aad2c6a8d32 (diff) |
Added RNA for Curve modifier.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 2a6fc59e591..0206b66b4fc 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -161,10 +161,34 @@ static void rna_def_modifier_lattice(BlenderRNA *brna) 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) |