I want to do it so that when they press a button a window comes up which says 'Subdivision Level' and then an input where whoever's using it can put in a number which changes how much subdivision to add.
Here's the code:
import bpy
class customMenu(bpy.types.Menu):
bl_label = "Useful Menu"
bl_idname = "view3D.custom_menu"
def draw(self, context):
layout = self.layout
layout.operator("bpy.ops.object.subdivision_set(level=1")
layout.operator("object.duplicate_move")
def register():
bpy.utils.register_class(customMenu)
#bpy.ops.wm.call_menu(name=customMenu.bl_idname)
def unregister():
bpy.utils.unregister_class(customMenu)
if __name__ == "__main__":
register()
I know how to do everything else I'm just confused about how to make something which allows people to put in inputs/make a slider/make a check box in blender python.
I don't mind if as an answer you just put the code on how to make these input types or if you link a wiki article or something. I'm just having problems finding the right website and I'm pretty sure it can be done.
Here's a link to the blender tutorial that I currently want the input for. So that when I click something on the mini-menu, another mini-menu-thing will open asking how much levels you want and if you want it simple or catmull-clark etc.
I'm sorry if it's obvious but I couldn't find an answer anywhere.