diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-19 20:54:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-19 20:54:17 +0300 |
commit | fa59c6a3e7d72d57faadcf0795848b4c3b8381d9 (patch) | |
tree | ea668f42028f8cdf5a5968feeed27e8bd99b30fd /intern/cycles/blender/addon/operators.py | |
parent | e7f535cd4cf919b7e479d20b8a1b6714f166151d (diff) | |
parent | 83de13f75aafca7d4e1d58ddd36cca19121aa84f (diff) |
Merge branch 'blender2.7'
Diffstat (limited to 'intern/cycles/blender/addon/operators.py')
-rw-r--r-- | intern/cycles/blender/addon/operators.py | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/intern/cycles/blender/addon/operators.py b/intern/cycles/blender/addon/operators.py index 63c9868ca6a..b53679bd328 100644 --- a/intern/cycles/blender/addon/operators.py +++ b/intern/cycles/blender/addon/operators.py @@ -124,9 +124,48 @@ class CYCLES_OT_denoise_animation(Operator): return {'FINISHED'} +class CYCLES_OT_merge_images(Operator): + "Combine OpenEXR multilayer images rendered with different sample" \ + "ranges into one image with reduced noise." + bl_idname = "cycles.merge_images" + bl_label = "Merge Images" + + input_filepath1: StringProperty( + name='Input Filepath', + description='File path for image to merge', + default='', + subtype='FILE_PATH') + + input_filepath2: StringProperty( + name='Input Filepath', + description='File path for image to merge', + default='', + subtype='FILE_PATH') + + output_filepath: StringProperty( + name='Output Filepath', + description='File path for merged image', + default='', + subtype='FILE_PATH') + + def execute(self, context): + in_filepaths = [self.input_filepath1, self.input_filepath2] + out_filepath = self.output_filepath + + import _cycles + try: + _cycles.merge(input=in_filepaths, output=out_filepath) + except Exception as e: + self.report({'ERROR'}, str(e)) + return {'FINISHED'} + + return {'FINISHED'} + + classes = ( CYCLES_OT_use_shading_nodes, - CYCLES_OT_denoise_animation + CYCLES_OT_denoise_animation, + CYCLES_OT_merge_images ) def register(): |