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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2022-10-21 19:39:14 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-10-21 19:39:14 +0300
commita1706bd0f04b03ff3fcf52d81acc6e42b4ae96db (patch)
tree159757529606ce340d7a8a79948f45d5e99d1360
parentae3d53a7ceb2215ef1d75b95d321c6b89bd401c6 (diff)
glTF importer: add hook before gltf import
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_gltf.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index fb8d316f..6650f18d 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -4,7 +4,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (3, 4, 36),
+ "version": (3, 4, 37),
'blender': (3, 3, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
index b1587ae2..ffbc162f 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
@@ -6,6 +6,7 @@ from mathutils import Vector, Quaternion, Matrix
from .gltf2_blender_scene import BlenderScene
from ..com.gltf2_blender_ui import gltf2_KHR_materials_variants_variant, gltf2_KHR_materials_variants_primitive, gltf2_KHR_materials_variants_default_material
from .gltf2_blender_material import BlenderMaterial
+from io_scene_gltf2.io.imp.gltf2_io_user_extensions import import_user_extensions
class BlenderGlTF():
@@ -16,6 +17,9 @@ class BlenderGlTF():
@staticmethod
def create(gltf):
"""Create glTF main method, with optional profiling"""
+
+ import_user_extensions('gather_import_gltf_before_hook', gltf)
+
profile = bpy.app.debug_value == 102
if profile:
import cProfile, pstats, io