[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30546] trunk/blender/source/blender/ editors/mesh/editmesh_add.c: Fix #22905

Diego Borghetti bdiego at gmail.com
Tue Jul 20 18:54:50 CEST 2010


Revision: 30546
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30546
Author:   bdiego
Date:     2010-07-20 18:54:50 +0200 (Tue, 20 Jul 2010)

Log Message:
-----------
Fix #22905

[#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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/mesh/editmesh_add.c

Modified: trunk/blender/source/blender/editors/mesh/editmesh_add.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_add.c	2010-07-20 16:44:59 UTC (rev 30545)
+++ trunk/blender/source/blender/editors/mesh/editmesh_add.c	2010-07-20 16:54:50 UTC (rev 30546)
@@ -1286,7 +1286,7 @@
 	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);





More information about the Bf-blender-cvs mailing list