Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for gtlf exporter python library path changes #228

Merged
merged 3 commits into from
Jul 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions addons/io_hubs_addon/io/utils.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import os
import bpy
from io_scene_gltf2.blender.com import gltf2_blender_extras
from io_scene_gltf2.blender.exp import gltf2_blender_gather_materials, gltf2_blender_gather_nodes, gltf2_blender_gather_joints
from io_scene_gltf2.blender.exp import gltf2_blender_gather_texture_info, gltf2_blender_export_keys
if bpy.app.version >= (3, 6, 0):
from io_scene_gltf2.blender.exp import gltf2_blender_gather_nodes, gltf2_blender_gather_joints
from io_scene_gltf2.blender.exp.material import gltf2_blender_gather_materials, gltf2_blender_gather_texture_info
from io_scene_gltf2.blender.exp.material.extensions import gltf2_blender_image
else:
from io_scene_gltf2.blender.exp import gltf2_blender_gather_materials, gltf2_blender_gather_nodes, gltf2_blender_gather_joints
from io_scene_gltf2.blender.exp import gltf2_blender_gather_texture_info, gltf2_blender_export_keys
from io_scene_gltf2.blender.exp import gltf2_blender_image
from io_scene_gltf2.blender.exp.gltf2_blender_gather_cache import cached
from io_scene_gltf2.io.com import gltf2_io_extensions
from io_scene_gltf2.io.com import gltf2_io
from io_scene_gltf2.io.exp import gltf2_io_binary_data
from io_scene_gltf2.io.exp import gltf2_io_image_data
from io_scene_gltf2.blender.exp import gltf2_blender_image
from typing import Optional, Tuple, Union
from ..nodes.lightmap import MozLightmapNode

Expand Down Expand Up @@ -76,7 +81,7 @@ def gather_image(blender_image, export_settings):
if type(data) == tuple:
data = data[0]

if export_settings[gltf2_blender_export_keys.FORMAT] == 'GLTF_SEPARATE':
if export_settings['gltf_format'] == 'GLTF_SEPARATE':
uri = HubsImageData(data=data, mime_type=mime_type, name=name)
buffer_view = None
else:
Expand Down