]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/export_scene.py
Export instances created through geometry nodes
[libs/gl.git] / blender / io_mspgl / export_scene.py
index 78ce2cbd5a69b2329337e72e5ae499b8c9dc513e..861286ff4f2a2e54631093004e1a4ced14b8141e 100644 (file)
@@ -69,7 +69,9 @@ class SceneExporter:
 
                for i in instances:
                        obj_res = resources[i.prototype.name+".object"]
-                       st = scene_res.create_reference_statement("object", obj_res, i.name)
+                       st = scene_res.create_reference_statement("object", obj_res)
+                       if i.name:
+                               st.append(i.name)
 
                        ss = Statement("transform")
 
@@ -192,6 +194,7 @@ class SceneExporter:
 
                        st = Statement("effect", "shadow_map")
                        st.sub.append(Statement("type", Token("shadow_map")))
+                       st.sub.append(Statement("enable_for_method", "blended"))
                        st.sub.append(Statement("size", *self.compute_shadowmap_size(shadowed_lights)))
                        target, radius = self.compute_bounding_sphere(shadow_casters)
                        st.sub.append(Statement("target", *target))