From: Mikko Rasa Date: Wed, 20 Oct 2021 12:03:23 +0000 (+0300) Subject: Store prototype reference instead of just name in scene instances X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b7578c64755c203c1bbfbe539f29e68544dd1b17;p=libs%2Fgl.git Store prototype reference instead of just name in scene instances --- diff --git a/blender/io_mspgl/export_scene.py b/blender/io_mspgl/export_scene.py index 00f91c1a..0557073c 100644 --- a/blender/io_mspgl/export_scene.py +++ b/blender/io_mspgl/export_scene.py @@ -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") diff --git a/blender/io_mspgl/scene.py b/blender/io_mspgl/scene.py index 8f4f285b..03e239e6 100644 --- a/blender/io_mspgl/scene.py +++ b/blender/io_mspgl/scene.py @@ -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):