]> git.tdb.fi Git - libs/gl.git/commitdiff
Store prototype reference instead of just name in scene instances
authorMikko Rasa <tdb@tdb.fi>
Wed, 20 Oct 2021 12:03:23 +0000 (15:03 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 20 Oct 2021 12:03:23 +0000 (15:03 +0300)
blender/io_mspgl/export_scene.py
blender/io_mspgl/scene.py

index 00f91c1a4afcd6c5e5687066bc397c98baea628f..0557073ce826bffbf26960e606afed90fc624cf2 100644 (file)
@@ -66,7 +66,7 @@ class SceneExporter:
                from .datafile import Statement
 
                for i in instances:
-                       obj_res = resources[i.prototype+".object"]
+                       obj_res = resources[i.prototype.name+".object"]
                        st = scene_res.create_reference_statement("object", obj_res, i.name)
 
                        ss = Statement("transform")
index 8f4f285b195d3af543b1a2b64c9ef592a626b6d3..03e239e6a77dce8dcb601e59230512d73e9c6a1f 100644 (file)
@@ -13,7 +13,7 @@ class Instance:
                self.name = obj.name
                self.matrix_world = obj.matrix_world
                self.rotation_mode = obj.rotation_mode
-               self.prototype = prototype.name
+               self.prototype = prototype
 
 class Scene:
        def __init__(self, scene, obj_filter=None):