Yet Another Blender Egg Exporter (YABEE)

Here is the .blend if anyone wants to test this out.
http://www.pasteall.org/blend/9264

When I tried to convert this into and egg using yabee rev10 on windows 7 I got this error

ndof: dead zone set to 0.10
found bundled python: C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\p
ython
read blend: C:\Users\DD\Desktop\Blender Files\Objects.blend
RELOADING MODULES
WRITE main EGG to C:\Users\DD\Desktop\My Projects\Panda3d\Objects.egg
Traceback (most recent call last):
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
Yabee_10_UI.py", line 128, in execute
    return write_some_data(context, self.filepath, self.use_setting, self.use_se
tting2,self.use_setting3, self.StartFrame, self.EndFrame, self.FrameRate, self.A
nimationName, self.use_setting4, self.tpath)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
Yabee_10_UI.py", line 89, in write_some_data
    FLOATING_POINT_ACCURACY)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 1024, in write_out
    file.write(gr.get_full_egg_str())
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 115, in get_full_egg_str
    egg_str += ch.get_full_egg_str(level + 1)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 93, in get_full_egg_str
    egg_mesh = EGGMeshObjectData(self.object)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 307, in __init__
    self.tbs = yabee_libs.tbn_generator.TBNGenerator(obj).generate()
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\tbn_generator.py", line 49, in generate
    tbs = self.get_triangle_basis(tidx)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\tbn_generator.py", line 71, in get_triangle_basis
    vtx0 = self.obj_ref.data.vertices[triangle[0]].co * c_mat
ValueError: (Vector * Matrix) is now removed, reverse the order (promoted to an
Error for Debug builds)

location:<unknown location>:-1

location:<unknown location>:-1
RELOADING MODULES
WRITE main EGG to C:\Users\DD\Desktop\My Projects\Panda3d\floor.egg
COPY IMAGE C:\Users\DD\Desktop\Blender Files\Textures\Chessboard_Texture_by_Svei
njo.png to C:\Users\DD\Desktop\My Projects\Panda3d\maps\Chessboard_Texture_by_Sv
einjo.png; rel path ./maps/Chessboard_Texture_by_Sveinjo.png
Traceback (most recent call last):
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
Yabee_10_UI.py", line 128, in execute
    return write_some_data(context, self.filepath, self.use_setting, self.use_se
tting2,self.use_setting3, self.StartFrame, self.EndFrame, self.FrameRate, self.A
nimationName, self.use_setting4, self.tpath)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
Yabee_10_UI.py", line 89, in write_some_data
    FLOATING_POINT_ACCURACY)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 1024, in write_out
    file.write(gr.get_full_egg_str())
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 115, in get_full_egg_str
    egg_str += ch.get_full_egg_str(level + 1)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 93, in get_full_egg_str
    egg_mesh = EGGMeshObjectData(self.object)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\egg_writer.py", line 307, in __init__
    self.tbs = yabee_libs.tbn_generator.TBNGenerator(obj).generate()
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\tbn_generator.py", line 49, in generate
    tbs = self.get_triangle_basis(tidx)
  File "C:\Users\DD\Desktop\Blender Files\Blender2.59 39568\2.59\scripts\addons\
yabee_libs\tbn_generator.py", line 71, in get_triangle_basis
    vtx0 = self.obj_ref.data.vertices[triangle[0]].co * c_mat
ValueError: (Vector * Matrix) is now removed, reverse the order (promoted to an
Error for Debug builds)

location:<unknown location>:-1

location:<unknown location>:-1

As you will see it the blend its a vere simple file just 3 mesh objects with no uv teturers and only one uv testure and no materieal. Just to check if I have everything done right in the blend I tryied exporting this using cheick r91 it worked perfectly and pview showed the egg just as I expected it to.

Shaba1
Seems that you use Blender 2.59. If so, why do you use rev10 instead 11?

Duh Sorry I thought rev 10 was for the whole 2.5 series
I will replace it and try again with rev11 and let you know the results.

Since still make changes in the new versions of Blender’s API, so we can not be sure that older versions of the script will work with the whole 2.5 series.

Texting from my phone. So this will be short
It worked with that file
Tried am animated human but no animation and very small figure

Are there any other modifiers in the model except Armature?
What bones type and vertices assignment are used?

There are no other modifier other then the armature modifier. All bones are Octohedral, I assume that is what you mean by “bone types”. Vertices are assigned by weight painting each bone to the mesh it is supposed to deform.

I can give you a link to the blend if you need it.

Yes, seems I need to see .blend

http://www.pasteall.org/blend/9284
There is the blend. I packed the texture with it you will probably have to unpack it. This is just a test figure not something I would ever publish just something I was making to get practice.

Oh I discovered that I could use the right mouse button drage in pview to bring the figure closer to the view. So the small issue is solved. The thing is that in when I export this same figure using chicken the figure is fills the pview window and the animation automatically starts.

The non animation issue is still there . That is in pview the figure still does not animate.

Hm. I have not had any problem with this file. Probably you don’t pointed on animation file for view that animation.

panda3d.org/manual/index.php … s_in_Pview

that was the exact problem. I got use en aly playing the first animation associated with and export when you checked the pview button.

Now I would like to ask this question if you have multiple actions in a blend file what is the way of getting them all exported to the same file as the mesh. Or is the even possible with Yabee?

I’d advise against doing so. You’ll might run into problems, mainly because of the Actor class. at some point, it expects the animations to be separate files.

As a side effect you’ll get a more modular model.
Let’s say you don’t need a specific animation. With separate files you only load what you need. but okay, the downside is more HDD read actions.

For writing all animation data to the same file as the mesh, you should set SEPARATE_ANIM_FILE to False. But as Nemesis#13 said - you may have some problems with the Actor class while loading this animations.

Question: the chicken install readme file says to install the chicken exporter to something like this “C:/Program FIles/Blender Foundation/.blender/scripts” but blender 2.5 and 2.6 do not have .blender in the file structure. I add the files into C:/Program FIles/Blender Foundation/Blender/2.60/scripts but I see nothing in the import/export menu in Blender. Whats the deal?
thanks in advance.

This thread is not about Chicken, but another exporter that has nothing in common with chicken. Chicken is for Blender 2.4 only. For later Blender versions use the script this thread is about.

is this compatible with blender 2.6? I’ve been trying to install it also in 2.5 but without any success, is there a ‘way’ to install it in Blender 2.5/2.6 for windows?

you need to go back and read thru the thread. I think what youa re trying to do is run the script from the import export menu by putting it in /scripts/addons. that is not how it is done. You run the script in the blender text editor and press Alt-P.

May I ask why this is not a Blender addon?
Importers/exporters are meant to be used by modellers. They don’t know how to open python files and the code they see confuses them.
Blender 2.5+ greatly simplifies using importers/exporters by allowing ordinary mortals (non-programmers) to simply “install” them like they install any other program.
I see no reason to not have it as an addon…

It’s a dev version, if i can say so, therefore i didn’t make binding to the plugin interface.

FYI, the 2.4 Blender exporter, “Chicken”, had new features added even after it was released, up until it was abandoned when Blender 2.5 was announced.
So what do you mean by dev version? It already has all the features I can think of. If you are adding new features, that’s fine, but it is already quite usable and new features in programs are added in newer versions.
So I don’t think it’s good idea to not add a simple GUI to a modeller’s tool just because you are still adding new features.

Maybe you could clarify what you mean by dev version.

I could help with the GUI part.

As for making an addon from it, it’s as simple as adding a special dictionary and 2 register and unregister functions.
This video covers it: cgcookie.com/blender/2011/03/15/ … an-add-on/

Anyway, thanks for your hard work. But it would be really usable as the old exporter if the script would have these basic things.