mesh.data.faces removed from 2.6??

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

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

mesh.data.faces removed from 2.6??

Post by 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??

Post by spaces » Sat May 26, 2012 11:09 pm

Look up tessfaces.

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

Post by 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

Post by 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

Post by 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

Post by 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...

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests