diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-01-02 05:37:54 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-01-02 05:37:54 +0300 |
commit | ada3868efdfb49bc24c4ee789aa53d66383d4658 (patch) | |
tree | 52051afe20b81307ed5a2cecf2f191a5dae1ed6a /source/blender/makesrna | |
parent | d812fc0bd0fc4414ab18e5a9eeb4a5caec7680a6 (diff) |
Added RNA for Hook modifier.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index d3818aa9aa7..4de2b411d93 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -454,11 +454,28 @@ static void rna_def_modifier_armature(BlenderRNA *brna) static void rna_def_modifier_hook(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *property; + PropertyRNA *prop; srna= RNA_def_struct(brna, "HookModifier", "Modifier"); RNA_def_struct_ui_text(srna, "Hook Modifier", "Hook Modifier."); RNA_def_struct_sdna(srna, "HookModifierData"); + + prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0, FLT_MAX); + RNA_def_property_ui_range(prop, 0, 100, 100, 2); + RNA_def_property_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends."); + + prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0, 1); + RNA_def_property_ui_text(prop, "Force", "Relative force of the hook."); + + prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "ID"); + RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset"); + + 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."); } static void rna_def_modifier_softbody(BlenderRNA *brna) |