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>2019-10-12 18:15:22 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-10-12 18:15:22 +0300
commitecdaef952383c28aa3793f86cee160202f46913b (patch)
treebe6556bc3a4af75a793cca17a788b187e87b0c72 /io_scene_gltf2/blender/imp/gltf2_blender_material.py
parentb9b1814a4c26f73aae7f306c9ff2e21b7b7bdcee (diff)
glTF importer: Import extra data as custom properties
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_material.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_material.py4
1 files changed, 4 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 55be1626..c5e3b51c 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_material.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_material.py
@@ -13,6 +13,8 @@
# limitations under the License.
import bpy
+
+from ..com.gltf2_blender_extras import set_extras
from .gltf2_blender_pbrMetallicRoughness import BlenderPbr
from .gltf2_blender_KHR_materials_pbrSpecularGlossiness import BlenderKHR_materials_pbrSpecularGlossiness
from .gltf2_blender_KHR_materials_unlit import BlenderKHR_materials_unlit
@@ -49,6 +51,8 @@ class BlenderMaterial():
mat = bpy.data.materials.new(name)
pymaterial.blender_material[vertex_color] = mat.name
+ set_extras(mat, pymaterial.extras)
+
mat.use_backface_culling = (pymaterial.double_sided != True)
ignore_map = False