[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11847] trunk/blender/source/blender/ python/api2_2x/Mesh.c: getting the mesh for all curves/surfs/ text raised an error every time because it was checking the wrong object was converted to a mesh .
Campbell Barton
cbarton at metavr.com
Mon Aug 27 22:05:06 CEST 2007
Revision: 11847
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11847
Author: campbellbarton
Date: 2007-08-27 22:05:05 +0200 (Mon, 27 Aug 2007)
Log Message:
-----------
getting the mesh for all curves/surfs/text raised an error every time because it was checking the wrong object was converted to a mesh. might be own fault.
Modified Paths:
--------------
trunk/blender/source/blender/python/api2_2x/Mesh.c
Modified: trunk/blender/source/blender/python/api2_2x/Mesh.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Mesh.c 2007-08-27 17:12:10 UTC (rev 11846)
+++ trunk/blender/source/blender/python/api2_2x/Mesh.c 2007-08-27 20:05:05 UTC (rev 11847)
@@ -6146,13 +6146,16 @@
/* get updated display list, and convert to a mesh */
makeDispListCurveTypes( tmpobj, 0 );
nurbs_to_mesh( tmpobj );
- tmpmesh = tmpobj->data;
- free_libblock_us( &G.main->object, tmpobj );
- if (ob->type != OB_MESH)
+ /* nurbs_to_mesh changes the type tp a mesh, check it worked */
+ if (tmpobj->type != OB_MESH) {
+ free_libblock_us( &G.main->object, tmpobj );
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"cant convert curve to mesh. Does the curve have any segments?" );
- break;
+ }
+ tmpmesh = tmpobj->data;
+ free_libblock_us( &G.main->object, tmpobj );
+ break;
case OB_MBALL:
/* metaballs don't have modifiers, so just convert to mesh */
ob = find_basis_mball( ob );
More information about the Bf-blender-cvs
mailing list