Here's the error I get on a simple cube with a principled BSDF shader and tried to export from blender 2.79:
This script was written Blender version 2.80.0 and might not function (correctly), though it is enabled
Traceback (most recent call last):
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2__init__.py", line 369, in execute
return gltf2_blender_export.save(self, context, export_settings)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 38, in save
scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 32, in gather_gltf2
scenes.append(__gather_scene(blender_scene, export_settings))
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
result = func(args)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 49, in __gather_scene
node = gltf2_blender_gather_nodes.gather_node(blender_object, export_settings)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
result = func(args)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 27, in gather_node
if not __filter_node(blender_object, export_settings):
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 52, in __filter_node
if bpy.app.version < (2, 80, 0):
NameError: name 'bpy' is not defined
location:
The glTF Blender I/O works at the moment for both 2.79 and 2.8. As this version is not final, maybe some issues do exist, but basically it should work in both versions.
As soon as Blender 2.8 is stable plus the major Blender community is using this latest version, probably 2.79 support will be dropped in the future.
makes sense. Thanks. I wonder why it errors exporting a cube. I鈥檒l investigate.
hmm.. not able to export a simple cube w defaults from blender 2.79 on windows 10.
Traceback (most recent call last):
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\__init__.py", line 369, in execute
return gltf2_blender_export.save(self, context, export_settings)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 38, in save
scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 32, in gather_gltf2
scenes.append(__gather_scene(blender_scene, export_settings))
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
result = func(*args)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 49, in __gather_scene
node = gltf2_blender_gather_nodes.gather_node(blender_object, export_settings)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 51, in wrapper_cached
result = func(*args)
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 27, in gather_node
if not __filter_node(blender_object, export_settings):
File "C:\Users\bay\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 52, in __filter_node
if bpy.app.version < (2, 80, 0):
NameError: name 'bpy' is not defined
location: <unknown location>:-1
should be fixed with the most recent commit of the add on
Cheers mate.
btw, I made a .bat file to make installing easier if it's usefull to you.
@echo off
robocopy io_scene_gltf2 "%appdata%\Blender Foundation\Blender\2.79\scripts\addons\io_scene_gltf2" /E /is
pause