[#22905] Adding objects with a grid size of <1m results in a 0 size object

The problem here is that the return value of the function
ED_object_new_primitive_matrix is a float, not an int.

This come from an old revision, before the two dia and depth
multiplication was using the function (two call to the same
function). This was change to only call the functio one time
and store the value in the "scale" variable, but the scale
was declare as int, not float.
This commit is contained in:
Diego Borghetti 2010-07-20 16:54:50 +00:00
parent 75913ce446
commit a725cac520

@ -1286,7 +1286,7 @@ static void make_prim_ext(bContext *C, float *loc, float *rot, int enter_editmod
Object *obedit= CTX_data_edit_object(C);
int newob = 0;
float mat[4][4];
int scale;
float scale;
if(obedit==NULL || obedit->type!=OB_MESH) {
obedit= ED_object_add_type(C, OB_MESH, loc, rot, FALSE, layer);