I'm working on a custom panel in Blender. I can add a subdivision modifier with python like this:
subsurfMod = self.layout.operator("object.modifier_add", text ="Add subdivision", icon="MOD_SUBSURF") subsurfMod.type='SUBSURF'
However I want to also specify the number of cuts. Something like this doesn't work:
What do I have to use instead?