mesh.data.faces removed from 2.6??

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

LukasBanana
Posts: 6
Joined: Fri Feb 10, 2012 9:53 pm

mesh.data.faces removed from 2.6??

Postby LukasBanana » Sat May 26, 2012 5:32 pm

How can I port my old Blender 2.5 python exporter to 2.6 during
'faces' no longer exist in Blender 2.6?!
Why does the Blender Python API changing constantly??

spaces
Posts: 22
Joined: Sat Sep 10, 2011 7:03 am

Re: mesh.data.faces removed from 2.6??

Postby spaces » Sat May 26, 2012 11:09 pm

Look up tessfaces.

LukasBanana
Posts: 6
Joined: Fri Feb 10, 2012 9:53 pm

Postby LukasBanana » Sun May 27, 2012 6:09 pm

When I enter "tessfaces" in the Python Console the count of elements are always 0.

len(bpy.data.meshes[0].tessfaces) is always 0. I tried it with a default cube and other objects.

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Mon May 28, 2012 7:59 pm

read the docs:
http://www.blender.org/documentation/bl ... tion-faces

when using to_mesh(), tessfaces get calculated implicitly (afaik). Otherwise, use Mesh.update(calc_tessfaces=True) before trying to access .tessfaces
I'm sitting, waiting, wishing, building Blender in superstition...

LukasBanana
Posts: 6
Joined: Fri Feb 10, 2012 9:53 pm

Postby LukasBanana » Tue May 29, 2012 1:43 pm

Thanks. Now I think "MeshPolygon" is what I'm searching for.
I hope I don't neet to change much code, just exchanging "faces" to "polygons"

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Tue May 29, 2012 7:54 pm

no, if you wanna export N-gons, it takes more than just changing from faces to polygons. You gotta read about Loops, otherwise you won't understand how to access UV coords etc.
I'm sitting, waiting, wishing, building Blender in superstition...


Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest