[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55055] trunk/blender: Simple deform modifier: replace factor property by angle for twist and bend
Brecht Van Lommel
brechtvanlommel at pandora.be
Tue Mar 5 15:42:07 CET 2013
Revision: 55055
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55055
Author: blendix
Date: 2013-03-05 14:42:06 +0000 (Tue, 05 Mar 2013)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
trunk/blender/source/blender/makesrna/intern/rna_modifier.c
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py 2013-03-05 14:19:09 UTC (rev 55054)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py 2013-03-05 14:42:06 UTC (rev 55055)
@@ -715,7 +715,10 @@
col = split.column()
col.label(text="Deform:")
- col.prop(md, "factor")
+ if md.deform_method in {'TAPER', 'STRETCH'}:
+ col.prop(md, "factor")
+ else:
+ col.prop(md, "angle")
col.prop(md, "limits", slider=True)
if md.deform_method in {'TAPER', 'STRETCH', 'TWIST'}:
col.prop(md, "lock_x")
Modified: trunk/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_modifier.c 2013-03-05 14:19:09 UTC (rev 55054)
+++ trunk/blender/source/blender/makesrna/intern/rna_modifier.c 2013-03-05 14:42:06 UTC (rev 55055)
@@ -2590,9 +2590,16 @@
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);
RNA_def_property_float_sdna(prop, NULL, "limit");
RNA_def_property_array(prop, 2);
More information about the Bf-blender-cvs
mailing list