]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/export_scene.py
Refactor the structure of sequence template files
[libs/gl.git] / blender / io_mspgl / export_scene.py
index 162a1882b5e8d135168600da6e0bd2550fd00f21..8666e98beee0ef9489557d28da89fdcf788ee036 100644 (file)
@@ -128,6 +128,8 @@ class SceneExporter:
                seq_res.statements.append(ss)
 
                scene_res = resources[scene.name+".scene"]
+               seq_res.statements.append(seq_res.create_reference_statement("renderable", "content", scene_res))
+
                lighting_res = resources[scene.name+".lightn"]
 
                any_opaque = False
@@ -144,31 +146,35 @@ class SceneExporter:
                        ss = Statement("step", "", "content")
                        ss.sub.append(Statement("depth_test", Token("LEQUAL")))
                        ss.sub.append(seq_res.create_reference_statement("lighting", lighting_res))
-                       ss.sub.append(seq_res.create_reference_statement("scene", scene_res))
                        seq_res.statements.append(ss)
 
                if any_blended:
                        ss = Statement("step", "blended", "content")
                        ss.sub.append(Statement("depth_test", Token("LEQUAL")))
                        ss.sub.append(seq_res.create_reference_statement("lighting", lighting_res))
-                       ss.sub.append(seq_res.create_reference_statement("scene", scene_res))
                        seq_res.statements.append(ss)
 
                if scene.use_ao:
-                       ss = Statement("ambient_occlusion")
+                       ss = Statement("postprocessor")
+                       ss.sub.append(Statement("type", Token("ambient_occlusion")))
                        ss.sub.append(Statement("occlusion_radius", scene.ao_distance))
                        ss.sub.append(Statement("samples", scene.ao_samples))
                        seq_res.statements.append(ss)
 
                if scene.use_hdr:
-                       seq_res.statements.append(Statement("bloom"))
-                       ss = Statement("colorcurve")
+                       ss = Statement("postprocessor")
+                       ss.sub.append(Statement("type", Token("bloom")))
+                       seq_res.statements.append(ss)
+
+                       ss = Statement("postprocessor")
+                       ss.sub.append(Statement("type", Token("colorcurve")))
                        ss.sub.append(Statement("exposure_adjust", scene.exposure))
                        ss.sub.append(Statement("srgb"))
                        seq_res.statements.append(ss)
                else:
                        # Add a colorcurve with linear response to convert into sRGB color space
-                       ss = Statement("colorcurve")
+                       ss = Statement("postprocessor")
+                       ss.sub.append(Statement("type", Token("colorcurve")))
                        ss.sub.append(Statement("brightness_response", 1.0))
                        ss.sub.append(Statement("srgb"))
                        seq_res.statements.append(ss)