remove old file

main
Anish Lakhwara 2022-08-28 17:20:51 +10:00
parent a7767978c2
commit 7c9315bf8a
1 changed files with 0 additions and 48 deletions

48
Text
View File

@ -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()