[#24935] Proportional translation size stuck to none
authorMartin Poirier <theeth@yahoo.com>
Sat, 27 Nov 2010 19:18:13 +0000 (19:18 +0000)
committerMartin Poirier <theeth@yahoo.com>
Sat, 27 Nov 2010 19:18:13 +0000 (19:18 +0000)
Adjust hard and soft limits on proportional size operator property.

Prevent zero in old files with reset if under hard limit (in tools settings).

source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c

index 8ff852bad32c4a2553561b043d5e60983e921dec..9e37f28935108cecff11b31b268c598e3169b62c 100644 (file)
@@ -1084,8 +1084,9 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                
                
                /* TRANSFORM_FIX_ME rna restrictions */
-               if (t->prop_size <= 0)
+               if (t->prop_size <= 0.00001f)
                {
+                       printf("Proportional size (%f) under 0.00001, reseting to 1!\n", t->prop_size);
                        t->prop_size = 1.0f;
                }
                
index 94af243eb0eadd89581579d78c9f350f620fd52c..5f5eb2f19641870b71ab018210e73490e49459ec 100644 (file)
@@ -422,7 +422,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
        {
                RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, "Proportional Editing", "");
                RNA_def_enum(ot->srna, "proportional_edit_falloff", proportional_falloff_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
-               RNA_def_float(ot->srna, "proportional_size", 1, 0, FLT_MAX, "Proportional Size", "", 0, 100);
+               RNA_def_float(ot->srna, "proportional_size", 1, 0.00001f, FLT_MAX, "Proportional Size", "", 0.001, 100);
        }
 
        if (flags & P_SNAP)