Use GP_RENDER_FILE_FORMAT env var to set file output nodes
This commit is contained in:
@@ -152,19 +152,18 @@ def copy_settings(obj_a, obj_b):
|
||||
pass
|
||||
|
||||
def set_file_output_format(fo):
|
||||
# FIXME for now default fallback to multilayer
|
||||
env_file_format = os.environ.get('FILE_FORMAT')
|
||||
fo.format.file_format = env_file_format if env_file_format else 'OPEN_EXR_MULTILAYER'
|
||||
# fo.format.file_format = 'OPEN_EXR' # 'OPEN_EXR_MULTILAYER'
|
||||
fo.format.color_mode = 'RGBA'
|
||||
fo.format.color_depth = '16'
|
||||
fo.format.exr_codec = 'PIZ' # 'ZIP', 'RLE'
|
||||
|
||||
## PNG format
|
||||
# fo.format.file_format = 'PNG'
|
||||
# fo.format.color_mode = 'RGBA'
|
||||
# fo.format.color_depth = '8'
|
||||
# fo.format.compression = 15
|
||||
env_file_format = json.loads(os.environ.get('GP_RENDER_FILE_FORMAT', '{}'))
|
||||
if not env_file_format:
|
||||
env_file_format = {
|
||||
'file_format': 'OPEN_EXR_MULTILAYER',
|
||||
'exr_codec': 'ZIP',
|
||||
'color_depth': '16',
|
||||
'color_mode': 'RGBA'
|
||||
}
|
||||
|
||||
for k, v in env_file_format.items():
|
||||
setattr(fo.format, k, v)
|
||||
|
||||
def set_scene_aa_settings(scene=None, aa=True):
|
||||
'''aa == using native AA, else disable scene AA'''
|
||||
|
||||
Reference in New Issue
Block a user