diff options
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r-- | source/blender/editors/object/object_add.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index b8c66fdd109..075e382f628 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -263,7 +263,7 @@ void ED_object_add_unit_props(wmOperatorType *ot) { PropertyRNA *prop; - prop = RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); + prop = RNA_def_float(ot->srna, "radius", 1.0f, 0.0, OBJECT_ADD_SIZE_MAXF, "Radius", "", 0.001, 100.00); RNA_def_property_subtype(prop, PROP_DISTANCE); } @@ -281,11 +281,12 @@ void ED_object_add_generic_props(wmOperatorType *ot, bool do_editmode) RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } - prop = RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", - "Location for the newly added object", -FLT_MAX, FLT_MAX); + prop = RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -OBJECT_ADD_SIZE_MAXF, OBJECT_ADD_SIZE_MAXF, + "Location", "Location for the newly added object", -1000.0f, 1000.0f); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", - "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f); + prop = RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -OBJECT_ADD_SIZE_MAXF, OBJECT_ADD_SIZE_MAXF, + "Rotation", "Rotation for the newly added object", + DEG2RADF(-360.0f), DEG2RADF(360.0f)); RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", ""); |