From ed5afbdff7b5440ce18d20d9a770551890a2ad57 Mon Sep 17 00:00:00 2001 From: meta-androcto <meta.androcto1@gmail.com> Date: Fri, 24 May 2019 16:49:48 +1000 Subject: [PATCH] render_auto_tile_size: initial update to 2.8 --- render_auto_tile_size.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/render_auto_tile_size.py b/render_auto_tile_size.py index d71a122de..7029b4b33 100644 --- a/render_auto_tile_size.py +++ b/render_auto_tile_size.py @@ -20,8 +20,8 @@ bl_info = { "name": "Auto Tile Size", "description": "Estimate and set the tile size that will render the fastest", "author": "Greg Zaal", - "version": (3, 1, 2), - "blender": (2, 74, 0), + "version": (3, 1, 3), + "blender": (2, 80, 0), "location": "Render Settings > Performance", "warning": "", "wiki_url": "https://wiki.blender.org/index.php?title=Extensions:2.6/Py/" @@ -460,14 +460,16 @@ def menu_func_cycles(self, context): ui_layout('CYCLES', self.layout, context) -def menu_func_bi(self, context): - ui_layout('BLENDER_RENDER', self.layout, context) - - # ##### REGISTRATION ##### +classes = ( + AutoTileSizeSettings, + SetTileSize +) + def register(): - bpy.utils.register_module(__name__) + for cls in classes: + bpy.utils.register_class(cls) bpy.types.Scene.ats_settings = PointerProperty( type=AutoTileSizeSettings @@ -479,13 +481,11 @@ def register(): if cycles_panel is not None: cycles_panel.append(menu_func_cycles) - bpy.types.RENDER_PT_performance.append(menu_func_bi) - bpy.app.handlers.scene_update_post.append(on_scene_update) + bpy.app.handlers.depsgraph_update_post.append(on_scene_update) def unregister(): - bpy.app.handlers.scene_update_post.remove(on_scene_update) - bpy.types.RENDER_PT_performance.remove(menu_func_bi) + bpy.app.handlers.depsgraph_update_post.remove(on_scene_update) cycles_panel = getattr(bpy.types, "CYCLES_RENDER_PT_performance", None) if cycles_panel is not None: @@ -493,7 +493,8 @@ def unregister(): del bpy.types.Scene.ats_settings - bpy.utils.unregister_module(__name__) + for cls in reversed(classes): + bpy.utils.unregister_class(cls) if __name__ == "__main__": -- GitLab