Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Blender 2.62 compatibility issue fixed #5

Merged
merged 1 commit into from May 15, 2012

Conversation

Projects
None yet
3 participants
Contributor

rpassis commented May 15, 2012

The latest version of the export plugin doesn't work on Blender 2.62+ due to some changes to the api (more details here http://lists.blender.org/pipermail/bf-python/2012-March/005837.html)

Owner

jlamarche commented May 15, 2012

Hey, thanks! I've been meaning to get around to this, now you've saved me the trouble. :)

Are you sure this isn't actually a 2.63 compatibility issue, however? BMesh was merged with trunk for 2.63 and that's when the faces attribute was renamed IIRC. Either way, thanks for sharing this back with me.

jlamarche added a commit that referenced this pull request May 15, 2012

Merge pull request #5 from rpassis/master
Blender 2.63 compatibility issue fixed

@jlamarche jlamarche merged commit e503984 into jlamarche:master May 15, 2012

Contributor

rpassis commented May 15, 2012

Hey Jeff no worries!

From what I can see it is an issue due to changes on the API introduced in version 2.62.2 (?) according to this link http://lists.blender.org/pipermail/bf-python/2012-March/005837.html

I have also noticed a couple of people mentioning the problem on SO (http://stackoverflow.com/questions/5028563/exporting-a-blender-model-to-opengles-and-render-it-on-iphone/10593415#10593415)

Cheers,
Rog

krventh commented Jul 20, 2012

Hi Jeff

I found that the blender export wasn't working with the latest version of Blender. Searching online I found this page

http://www.blender.org/documentation/blender_python_api_2_63_7/info_gotcha.html#ngons-and-tessellation-faces

Which says that:

For exporters the most direct way to upgrade is to use tessfaces as with importing however its important to know that tessfaces may not exist for a mesh, the array will be empty as if there are no faces.

So before accessing tessface data call: bpy.types.Mesh.update (calc_tessface=True).

Modifying the exporter and adding the line:

object.data.update(calc_tessface=True)

at line 41 seems to resolve the problem.

print("Checking mesh if needs to convert quad to Tri...")
object.data.update(calc_tessface=True)
for face in object.data.tessfaces:
    if (len(face.vertices) > 3):
        bneedtri = True
        break
Owner

jlamarche commented Jul 26, 2012

Thanks. I'll get it updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment