Blender Exporter Error when trying to export .blend files (Blender 2.80 beta, Blender Exporter 6.0)

I have the latest Blender (2.80 beta), and the latest blender exporter (6.0).

I have .blend files which I was previously able to export to .babylon in older versions.

Now I’m getting an error when trying to export every single one of them.

I attached 2 of the .blend files and their corresponding errors.


File “C:\Users\royib\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\babylon_js\”, line 258, in draw
layout.prop(scene, ‘writeManifestFile’)
NameError: name ‘scene’ is not defined


File “C:\Users\royib\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\”, line 65, in execute
exporter.execute(context, self.filepath)
File “C:\Users\royib\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\babylon_js\”, line 154, in execute
File “C:\Users\royib\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\babylon_js\”, line 183, in to_json_file
File “C:\Users\royib\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\babylon_js\materials\”, line 184, in to_json_file
write_color(file_handler, propName, self.diffuseColor)
File “C:\Users\royib\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\babylon_js\”, line 278, in write_color
file_handler.write(’,"’ + name + ‘":[’ + format_color(color, precision) + ‘]’)
File “C:\Users\royib\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\babylon_js\”, line 158, in format_color
return format_float(color.r, fmt) + ‘,’ + format_float(color.g, fmt) + ‘,’ + format_float(color.b, fmt)
AttributeError: ‘bpy_prop_array’ object has no attribute ‘r’


In general, .blend files from previous versions ARE NOT going to export & maybe not even render correctly in 2.80 without migration. This is especially true of .blends which both have textures & are not using nodes.

Your turtle falls into that category. If you looked at the turtle in 2.79, it had a texture. You were also using the old internal render engine, see.

When those type of materials come across in 2.80, they have just 4 properties, & there is no way to associate textures with materials which are not Nodes based.

If there are embedded textures in the .blend they will also come across, but it is better not to try and fix this file. Start with a new one, and file->append the objects from the old .blend, except lights. Lights have changed & will not export & possible not even function inside of Blender 2.80.

Then switch all the materials to Nodes (this is going to take some learning), add lights back in the same place, switching any hemi types to area.

Still even with an append scene, this simple material should exported, but it did not. I recently got an updated 2.80, but I did not run any exports from it till just now. Something may have changed in this later beta. I’ll have to look into that. One of my 2.80 scenes with a non-Nodes material just exported, so I know it should work, but do not think I ever tried to export a converted internal material.

With changes this big to a program, there are going to be a ton of scenes from blendswap and others which are never going to work right in Blender 2.80, much less export. All WILL load however. Even Blender 1.0 files will load. A .blend file is just a bunch of objects & properties. The properties may not have any meaning in the current program (like lights). This at least gives you a chance to migrate things over, but not going to work out of the box. The 5.6 exporter is not going to be maintained, at least by me, but it is also not going to dropped the repo. It will go into the deprecated directory.

1 Like

Thanks for the detailed answer, I’ll look into migrating everything.