X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_scene.py;h=7bb32efeeb927ab6c083d0bc387d7ccbf885e358;hb=715672cf2c64dab0744db676fdee255ee3a4cef7;hp=39a7428e146652018c5db011f2e8007e08d0e06c;hpb=57232117bfab90f5dd80131daa47d2f184de9ae2;p=libs%2Fgl.git diff --git a/blender/io_mspgl/export_scene.py b/blender/io_mspgl/export_scene.py index 39a7428e..7bb32efe 100644 --- a/blender/io_mspgl/export_scene.py +++ b/blender/io_mspgl/export_scene.py @@ -101,13 +101,14 @@ class SceneExporter: lighting_name = scene.name+".lightn" if lighting_name not in resources: lighting_res = Resource(lighting_name, "lighting") + lighting_res.statements.append(Statement("ambient", *tuple(scene.ambient_light))) for l in lights: lighting_res.statements.append(lighting_res.create_reference_statement("light", resources[l.name+".light"])) resources[lighting_name] = lighting_res def export_sequence(self, scene, resources): - from .datafile import Resource, Statement + from .datafile import Resource, Statement, Token seq_res = Resource(scene.name+".seq", "sequence") if scene.use_hdr: @@ -118,11 +119,17 @@ class SceneExporter: content = resources[scene.name+".wrapper.scene"] ss = Statement("pass", "", "content") - ss.sub.append(Statement("depth_test", "lequal")) + ss.sub.append(Statement("depth_test", Token("LEQUAL"))) ss.sub.append(seq_res.create_reference_statement("lighting", resources[scene.name+".lightn"])) ss.sub.append(seq_res.create_reference_statement("scene", content)) seq_res.statements.append(ss) + if scene.use_ao: + ss = Statement("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")