Topic: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hey!

The Blender exporter is incompatible with Blender 2.63, PLEASE fix it as soon as possible. It's kind of an urgent issue considering that Blender is the main tool to use with Maratis. I also donated 5 euros so maybe that's some slight motivation big_smile

Here is the traceback:

Traceback (most recent call last):
  File "/home/isak/Software/Blender/2.63a/2.63/scripts/addons/maratis/export_maratis.py", line 892, in execute
    mesh.exportMaratis()
  File "/home/isak/Software/Blender/2.63a/2.63/scripts/addons/maratis/export_maratis.py", line 132, in exportMaratis
    self.getMaterials()
  File "/home/isak/Software/Blender/2.63a/2.63/scripts/addons/maratis/export_maratis.py", line 370, in getMaterials
    faces = mesh.faces
AttributeError: 'Mesh' object has no attribute 'faces'

I found it kind of odd because I did find faces in the BMesh type of the Blender API. I would have fixed it myself (and might try tomorrow) but right now I'm kind of confused.

Anyhow I'd appreciate a quickfix, especially before the new maratis version is out.

This is mostly Blender's fault so I'm not really blaming you. I wish their API could be more backwards compatible instead of making arbitrary changes all the time hmm

Last edited by BitPuffin (2012-08-02 11:58:31)

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

It might also be time well spent to test with the pre release of 2.64 after fixing this. So you know that it still works.

I would also suggest adding a database of maratis addons for each version of Blender so that you can grab the one for your version. Just to be nice to those who aren't using bleeding edge smile

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Okay I fixed it for you! It appears it was just to change mesh.faces to mesh.polygons and the same thing in another place! It seems to work when exporting a default cube, but I don't know how it will work with complex models that have been edited with BMesh!

Here is a download for 2.63 that you just put in your scripts addons folder https://www.dropbox.com/s/63qug5u1hj7u2 … ort_263.7z I hope it helps everyone!

Here is also a paste of the file: https://gist.github.com/3236424 You'll notice changes on line 371 and 707. I hope it works for everybody! Glad I could provide a quick fix

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hi,
thanks !

I'll test it soon, it could be only that as they do a lot of renaming, it was something similar the previous time it broke.
Thank you for the effort !

note for later : look at MeshTessFace (more safe to have good tesselation for the new BMesh as it can use complex polygons)

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

i have test it and no error when exporting static meshes. I try to export a cube and it show up in maratis, but i just have one problem, how to properly give a static meshes a texture. FYI, i'm still a beginner in this stuff. In blender, after trial and error my cube has a texture in render mode  but not have it in textured view. So, my cube have a black color in maratis but i think the exporter is work. Thanks to BitPuffin for converting the script to Blender 2.63a and anael for the script

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

An update is online : http://code.google.com/p/maratis/downloads/list

The new script uses MeshTessFace to convert the mesh as using mesh.polygons could fail when the mesh is not triangle-based.

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

I tried this update on my 2.63 blender version, but I also have a "mesh object has no attribute faces" ...

Last edited by Alinor (2012-09-15 10:46:50)

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hi Alinor,
did you delete the previous add-on before importing the new one ?
(in user setting > add-on)

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hi wink, yes I removed the oldest before importing the new one.

I made a simple test  : export a plane with two textures, but I have another message now : "MeshTexturePoly has no attribute uv".

Have you succeded to export a mesh with UV coord with the 2.63 add-on ?

Last edited by Alinor (2012-09-15 15:50:07)

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hi,
right, I think I found the bug,

lets try again : http://maratis.googlecode.com/files/mar … er-263.zip

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

I have always the same problem :

subVert.uvs[uvlayer.name] = uvlayer.data[face.index].uv[id]

MeshTexturePoly has no attribute uv

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Strange it's the line I corrected, can you just try to delete the addon, restart blender, and then add the new version ?

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

BLender 2.63a here, and Im getting: " AttributeError: 'Nonetype' object has no attribute 'filepath'.

I tried saving to a different DIR, but same error.

The object was selected, and its a mesh with  3 textures ( texture painting), and I'm using the fixed version of the script.

Thx
gm


anael wrote:

Strange it's the line I corrected, can you just try to delete the addon, restart blender, and then add the new version ?

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hi,
I think if it's texture painting, you have to export the texture to a tga or png before, so it's a external file.

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Ok, It's my mistake, after changing the add-one, blender must be restart, I'll know it for the next time wink
Thanks for the job wink

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

I'm sorry for the double-post, but I have a problem :

When I want export several objects in a .mesh file, the bounding box is too narrow, I must transform the object in a single object in blender to have a good bounding box :

http://img15.hostingpics.net/pics/390750essai1.jpg
The left building is formed by several objects and the right building with one object

http://img15.hostingpics.net/pics/949061essai2.jpg

This is quite annoying because sometime some objects of the left building vanish (the squares at the top of the towers) ...

Last edited by Alinor (2012-09-16 14:24:44)

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hi and thx for reply Anael,

I don't follow you there about texture export. The only texture I have here, is the stencil , at least as far as my knowledge of blender goes. The stencil, which allows you to texture paint in blender ( layers), has the drawn textures on it, which I save everytime I exit blender ( or more often), and I'm not aware of any other saving of texture(s) that would be done.

Can you elaborate on what you meant ?

Thx
Gm




anael wrote:

Hi,
I think if it's texture painting, you have to export the texture to a tga or png before, so it's a external file.

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Alinor :
Ok, I will look what I can do,
in the meanwhile, you probably can do that on blender :
object > apply > rotation & scale

gamemaker :
When you do texture painting on Blender it is sometime done in a texture that is saved inside the blend file,
for Maratis you have to make this texture an external file, for example by doing :
uv editor : image > save as image

Or is the texture you paint on already an external file ?

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Ok, it's work after a ctrl+A > apply > location on all objects, the origin is unique for all objects.

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

The image I  am painting on, is the stencil map, which yes, I always save as 'save as' in UVmap editor in blender.

So yup , its not that, as its saved, otherwize when I load blender for the day, all my artwork would be toast wink)heh

Btw , sorry I didn't meant to say V. Painting; its 'Texture paint' .

thx
Gm



anael wrote:

Alinor :
Ok, I will look what I can do,
in the meanwhile, you probably can do that on blender :
object > apply > rotation & scale

gamemaker :
When you do texture painting on Blender it is sometime done in a texture that is saved inside the blend file,
for Maratis you have to make this texture an external file, for example by doing :
uv editor : image > save as image

Or is the texture you paint on already an external file ?

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

gamemaker :
I'm not able to reproduce it, can you send me a simple blend file that doesn't export ? thank you.

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

EDIT EDIT EDIT:
I just sent you a DROPbox URL, where the temp.blend file is.

Gm
-----------------------------------------------------------------------

How do I add a file to a post ?
I know of no other way to get it to you, short of some method not forum related.

Thx
Gm


anael wrote:

gamemaker :
I'm not able to reproduce it, can you send me a simple blend file that doesn't export ? thank you.

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Ok, I got your file,
the problem is with 'Stencil1" in the material textures list, it is not linked to any image.

I'll make a fix in the script so it still export the whole mesh when there is no image,
but for now, you can just select an image in "Stencil1", or remove "Stencil1".

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

Hi,

I made an update that ignore missing images (gamemaker) and that compute better bounding-box (Alinor)

Re: Incompatibility with Blender 2.63[FIX NOW AVAILABLE!!]

this is work, thanks wink