diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-03-05 18:42:06 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-03-05 18:42:06 +0400 |
commit | 65377714103259f0629ebfa8124a78364a997745 (patch) | |
tree | f0afdbbbe44e778e0fe97ea7b91cc0203cc0e6d9 /source/blender | |
parent | a31c0bcc648820d78f1265c116bece378c841561 (diff) |
Simple deform modifier: replace factor property by angle for twist and bend
modes, so we can show degrees rather than radians. Still refers to the same
DNA variable to keep backwards compatibility.
Patch #33807 by Gottfried Hofmann.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 810999033a4..9e9c9563c05 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2590,7 +2590,14 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna) prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -10, 10, 1, 3); - RNA_def_property_ui_text(prop, "Factor", "Amount to deform object"); + RNA_def_property_ui_text(prop, "Factor", "Amount to deform object."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); + RNA_def_property_float_sdna(prop, NULL, "factor"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -10, 10, 1, 3); + RNA_def_property_ui_text(prop, "Angle", "Angle of deformation."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE); |