Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gltf2_io_user_extensions.py « imp « io « io_scene_gltf2 - git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 505e326545ce70f83c8cb7f9e803c1703b9e305f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018-2021 The glTF-Blender-IO authors.

def import_user_extensions(hook_name, gltf_importer, *args):
    for extension in gltf_importer.import_user_extensions:
        hook = getattr(extension, hook_name, None)
        if hook is not None:
            try:
                hook(*args, gltf_importer)
            except Exception as e:
                print(hook_name, "fails on", extension)
                print(str(e))