I have add the MULTIRES modifier to an object in Python and would like to trigger the "subdivide" function. Since in Python you define a modifier like so:

obj.modifiers.new(type='MULTIRES', name="test")
obj.modifiers['test'].subdivision_type = 'CATMULL_CLARK'

How do I call the subdivide function? The Python info window is not helping neither it just says: (bpy.ops.object.multires_subdivide(modifier="test")).

And all my current attempts throw errors:

  • bpy.ops.object.multires_subdivide(modifier="test")
  • obj.modifiers['test'].multires_subdivide(modifier="test")
  • obj.modifiers['test'].multires_subdivide()
  • obj.modifiers['test'].subdivide()

as you see in API

bpy.ops.object.multires_subdivide(modifier="") Add a new level of subdivision

you can test this:

bpy.context.object.modifiers["Multires"].name = "A"
bpy.context.object.modifiers["A"].subdivision_type = 'CATMULL_CLARK'
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.