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>2021-07-04 18:38:11 +0300
committerJulien Duroure <julien.duroure@gmail.com>2021-07-04 18:38:11 +0300
commit260ca332f88f643a302bcabf140e3c471c8c621b (patch)
tree4485f89dfb9f6d9ae686bc6e89a6f4357b9ae982
parentc72e66249180b103165679834129574d5868fa68 (diff)
glTF importer: import custome properties from default scene
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py1
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_scene.py5
3 files changed, 7 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 187aac4e..a07fa7b7 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,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": (1, 7, 7),
+ "version": (1, 7, 8),
'blender': (2, 91, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
index 362e5b69..57df6306 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
@@ -331,6 +331,7 @@ def __gather_output(channels: typing.Tuple[bpy.types.FCurve],
object_path = get_target_object_path(target_datapath)
else:
object_path = None
+
is_armature_animation = bake_bone is not None or (blender_object_if_armature is not None and object_path != "")
if is_armature_animation:
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py
index d9dc9092..05520228 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py
@@ -17,6 +17,7 @@ import bpy
from .gltf2_blender_node import BlenderNode
from .gltf2_blender_animation import BlenderAnimation
from .gltf2_blender_vnode import VNode, compute_vnodes
+from ..com.gltf2_blender_extras import set_extras
class BlenderScene():
@@ -34,6 +35,10 @@ class BlenderScene():
if scene.render.engine not in ['CYCLES', 'BLENDER_EEVEE']:
scene.render.engine = "BLENDER_EEVEE"
+ if gltf.data.scene is not None:
+ pyscene = gltf.data.scenes[gltf.data.scene]
+ set_extras(scene, pyscene.extras)
+
compute_vnodes(gltf)
gltf.display_current_node = 0 # for debugging