diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 3e3377dcd38..a01f4487c0f 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -37,6 +37,8 @@ #include "DNA_object_force.h" #include "DNA_scene_types.h" +#include "BLI_math.h" + #include "BKE_animsys.h" #include "BKE_bmesh.h" /* For BevelModifierData */ #include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */ @@ -2099,18 +2101,21 @@ static void rna_def_modifier_screw(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); prop= RNA_def_property(srna, "steps", PROP_INT, PROP_UNSIGNED); - RNA_def_property_ui_range(prop, 1, 1024, 1, 0); + RNA_def_property_range(prop, 2, 10000); + RNA_def_property_ui_range(prop, 2, 512, 1, 0); RNA_def_property_ui_text(prop, "Steps", "Number of steps in the revolution"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "render_steps", PROP_INT, PROP_UNSIGNED); - RNA_def_property_ui_range(prop, 1, 1024, 1, 0); + RNA_def_property_range(prop, 2, 10000); + RNA_def_property_ui_range(prop, 2, 512, 1, 0); RNA_def_property_ui_text(prop, "Render Steps", "Number of steps in the revolution"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "iter"); - RNA_def_property_ui_range(prop, 1, 1024, 1, 0); + RNA_def_property_range(prop, 1, 10000); + RNA_def_property_ui_range(prop, 1, 100, 1, 0); RNA_def_property_ui_text(prop, "Iterations", "Number of times to apply the screw operation"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2119,10 +2124,9 @@ static void rna_def_modifier_screw(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Axis", "Screw axis"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - // XXX, convert to radians. prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); - //RNA_def_property_range(prop, 0, 180); - //RNA_def_property_ui_range(prop, 0, 180, 100, 2); + RNA_def_property_ui_range(prop, 0, -M_PI*2, M_PI*2, 2); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_text(prop, "Angle", "Angle of revolution"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); |