Merge branch 'blender2.7'
[blender.git] / intern / cycles / blender / addon / operators.py
index c39aa38..ed7f5c6 100644 (file)
@@ -49,13 +49,13 @@ class CYCLES_OT_denoise_animation(Operator):
     bl_idname = "cycles.denoise_animation"
     bl_label = "Denoise Animation"
 
-    input_filepath = StringProperty(
+    input_filepath: StringProperty(
         name='Input Filepath',
         description='File path for frames to denoise. If not specified, uses the render file path from the scene',
         default='',
         subtype='FILE_PATH')
 
-    output_filepath = StringProperty(
+    output_filepath: StringProperty(
         name='Output Filepath',
         description='If not specified, renders will be denoised in-place',
         default='',
@@ -64,9 +64,9 @@ class CYCLES_OT_denoise_animation(Operator):
     def execute(self, context):
         import os
 
-        preferences = context.user_preferences
+        preferences = context.preferences
         scene = context.scene
-        render_layer = scene.render.layers.active
+        view_layer = context.view_layer
 
         in_filepath = self.input_filepath
         out_filepath = self.output_filepath
@@ -105,7 +105,7 @@ class CYCLES_OT_denoise_animation(Operator):
         try:
             _cycles.denoise(preferences.as_pointer(),
                             scene.as_pointer(),
-                            render_layer.as_pointer(),
+                            view_layer.as_pointer(),
                             input=in_filepaths,
                             output=out_filepaths)
         except Exception as e: