[Bf-extensions-cvs] [a1706bd0] master: glTF importer: add hook before gltf import
Julien Duroure
noreply at git.blender.org
Fri Oct 21 18:50:27 CEST 2022
Commit: a1706bd0f04b03ff3fcf52d81acc6e42b4ae96db
Author: Julien Duroure
Date: Fri Oct 21 18:39:14 2022 +0200
Branches: master
https://developer.blender.org/rBAa1706bd0f04b03ff3fcf52d81acc6e42b4ae96db
glTF importer: add hook before gltf import
===================================================================
M io_scene_gltf2/__init__.py
M io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
===================================================================
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
More information about the Bf-extensions-cvs
mailing list