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:
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_material.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_material.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_material.py b/io_scene_gltf2/blender/imp/gltf2_blender_material.py
index 077f5af6..1a5be06f 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_material.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_material.py
@@ -18,6 +18,7 @@ from ..com.gltf2_blender_extras import set_extras
from .gltf2_blender_pbrMetallicRoughness import MaterialHelper, pbr_metallic_roughness
from .gltf2_blender_KHR_materials_pbrSpecularGlossiness import pbr_specular_glossiness
from .gltf2_blender_KHR_materials_unlit import unlit
+from io_scene_gltf2.io.imp.gltf2_io_user_extensions import import_user_extensions
class BlenderMaterial():
@@ -30,6 +31,8 @@ class BlenderMaterial():
"""Material creation."""
pymaterial = gltf.data.materials[material_idx]
+ import_user_extensions('gather_import_material_before_hook', gltf, pymaterial, vertex_color)
+
name = pymaterial.name
if name is None:
name = "Material_" + str(material_idx)
@@ -56,6 +59,8 @@ class BlenderMaterial():
else:
pbr_metallic_roughness(mh)
+ import_user_extensions('gather_import_material_after_hook', gltf, pymaterial, vertex_color, mat)
+
@staticmethod
def set_double_sided(pymaterial, mat):
mat.use_backface_culling = (pymaterial.double_sided != True)