[Bf-extensions-cvs] [42508e18] master: glTF importer: Use debug value 101 to display current node importing

Julien Duroure noreply at git.blender.org
Tue May 7 11:15:53 CEST 2019


Commit: 42508e1815c6f9b1ec93f4aeb77cefa93072593d
Author: Julien Duroure
Date:   Tue May 7 11:15:22 2019 +0200
Branches: master
https://developer.blender.org/rBA42508e1815c6f9b1ec93f4aeb77cefa93072593d

glTF importer: Use debug value 101 to display current node importing

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
M	io_scene_gltf2/blender/imp/gltf2_blender_node.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 6b14b8e9..a8673634 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, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
-    "version": (0, 9, 5),
+    "version": (0, 9, 6),
     'blender': (2, 80, 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 c3b511a2..fefb8095 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
@@ -29,6 +29,12 @@ class BlenderGlTF():
             bpy.context.scene.render.engine = 'BLENDER_EEVEE'
         BlenderGlTF.pre_compute(gltf)
 
+        gltf.display_current_node = 0
+        if gltf.data.nodes is not None:
+            gltf.display_total_nodes = len(gltf.data.nodes)
+        else:
+            gltf.display_total_nodes = "?"
+
         active_object_name_at_end = None
         if gltf.data.scenes is not None:
             for scene_idx, scene in enumerate(gltf.data.scenes):
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_node.py b/io_scene_gltf2/blender/imp/gltf2_blender_node.py
index 282144ba..76dadcc1 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_node.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_node.py
@@ -34,6 +34,10 @@ class BlenderNode():
         pynode.blender_object = ""
         pynode.parent = parent
 
+        gltf.display_current_node += 1
+        if bpy.app.debug_value == 101:
+            gltf.log.critical("Node " + str(gltf.display_current_node) + " of " + str(gltf.display_total_nodes) + " (idx " + str(node_idx) + ")")
+
         if pynode.mesh is not None:
 
             instance = False



More information about the Bf-extensions-cvs mailing list