X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_scene.py;h=8666e98beee0ef9489557d28da89fdcf788ee036;hp=162a1882b5e8d135168600da6e0bd2550fd00f21;hb=f44366c8785eb7a88755cd71250a8b85289eeed2;hpb=508475b76a5e8fbdd51f57d6587bbf9a2999682b diff --git a/blender/io_mspgl/export_scene.py b/blender/io_mspgl/export_scene.py index 162a1882..8666e98b 100644 --- a/blender/io_mspgl/export_scene.py +++ b/blender/io_mspgl/export_scene.py @@ -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)