I’m using cPickle to save some navmeshes, which is basically a mesh that represents walkable area. To do this I created 3 classes which sort of ‘mimic’ blender mesh structure, I have Vertex, Edge and Face.
So I can convert the blender mesh into my custom classes fairly simply, then I go to pickle it and thats all fine as well. But as soon as I un pickle it (in the same module!) I get thrown an error saying the Edge class doesn’t exist which it quite obviously does because I am starting at it. Then I went on and re pickled excluding all Edge objects from the pickle, this time it said the Vertex wasn’t around. I assume its going to be the same for Face (by the way I tried “print locals().keys()” and they sure are there).
What I’m thinking is my ‘module’ object isn’t really what I think it is, when I alt+a is my script run exactly there? Or does blender do some freaky stuff to it?
I’ve tried to re create this outside of blender but I couldn’t do it (where the classes are obviously are in the module) so this makes me think its a blender issue.
Heres the error:
File "NavmeshConverter.py", line 113, in <module> AttributeError: 'module' object has no attribute 'Edge'
I did some googling and found someone reported this bug on the python website but some dev dismissed it saying fixing it would break compatibility… nice.
Hope someone knows something.