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"]))
from .datafile import Resource, Statement
seq_res = Resource(scene.name+".seq", "sequence")
+ if scene.use_hdr:
+ seq_res.statements.append(Statement("hdr", True))
+
content = scene
if scene.background_set:
content = resources[scene.name+".wrapper.scene"]
ss.sub.append(seq_res.create_reference_statement("scene", content))
seq_res.statements.append(ss)
- # Add a colorcurve with linear response to convert into sRGB color space
- ss = Statement("colorcurve")
- ss.sub.append(Statement("brightness_response", 1.0))
- ss.sub.append(Statement("srgb"))
- 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")
+ 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.sub.append(Statement("brightness_response", 1.0))
+ ss.sub.append(Statement("srgb"))
+ seq_res.statements.append(ss)
return seq_res