[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11848] branches/2-44-stable/blender/ source/blender/python/api2_2x/Mesh.c: mesh fix from trunk, rev 11847
Campbell Barton
cbarton at metavr.com
Mon Aug 27 22:06:39 CEST 2007
Revision: 11848
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11848
Author: campbellbarton
Date: 2007-08-27 22:06:39 +0200 (Mon, 27 Aug 2007)
Log Message:
-----------
mesh fix from trunk, rev 11847
Revision Links:
--------------
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11847
Modified Paths:
--------------
branches/2-44-stable/blender/source/blender/python/api2_2x/Mesh.c
Modified: branches/2-44-stable/blender/source/blender/python/api2_2x/Mesh.c
===================================================================
--- branches/2-44-stable/blender/source/blender/python/api2_2x/Mesh.c 2007-08-27 20:05:05 UTC (rev 11847)
+++ branches/2-44-stable/blender/source/blender/python/api2_2x/Mesh.c 2007-08-27 20:06:39 UTC (rev 11848)
@@ -5717,13 +5717,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