From 7c9315bf8aa9a4c86784d6be0b98a0d5ba2da835 Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Sun, 28 Aug 2022 17:20:51 +1000 Subject: [PATCH] remove old file --- Text | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 Text diff --git a/Text b/Text deleted file mode 100644 index 6ec08c5..0000000 --- a/Text +++ /dev/null @@ -1,48 +0,0 @@ -bl_info = { - "name": "Swap Resulotion", - "blender": (2, 80, 0), - "category": "Context", -} - -import bpy - -class SwapResolution(bpy.types.Operator): - """Resolution Swaping button""" # Use this as a tooltip for menu items and buttons. - bl_idname = "scene.swap_res" # Unique identifier for buttons and menu items to reference. - bl_label = "Swap Resolution" # Display name in the interface. - - - def swap(self, curr_x, curr_y): - y = curr_x - x = curr_y - bpy.context.scene.render.resolution_y = y - bpy.context.scene.render.resolution_x = x - - def execute(self, context): # execute() is called when running the operator. - # The original script - render = context.scene.render - self.swap(render.resolution_x, render.resolution_y) - - return {'FINISHED'} # Lets Blender know the operator finished successfully. - -class FancyPanel(bpy.types.Panel): - bl_idname = "test_fancy_panel_for_fun" - bl_label = "Fancy Panel" - bl_space_type = 'PROPERTIES' - bl_region_type = "WINDOW" - - def draw(self, context): - self.layout.laber(text="Testing") - self.layout.operator("scene.swap_res") - -def register(): - bpy.utils.register_class(SwapResolution) - bpy.utils.register_class(FancyPanel) - # bpy.types.VIEW3D_MT_object.append(menu_func) # Adds the new operator to an existing menu. - -def unregister(): - bpy.utils.unregister_class(SwapResolution) - bpy.utils.unregister_class(FancyPanel) - -if __name__ == "__main__": - register() \ No newline at end of file