# Bind and apply SURFACE_DEFORM modifier without bpy.ops?

Is there a way to bind a surface deform mod without running

bpy.ops.object.surfacedeform_bind(modifier="Surface Deform")


and is there way to apply it without running

bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Surface Deform")


The obj.to_mesh() method described here, does not seem to work for Surface Deforms.

Thanks, I'd appreciate any pointers.

• Can you elaborate on obj.to_mesh() method "not seeming to work" – batFINGER Jun 11 '18 at 12:20
• @batFINGER It tutned out I had to do a scene.update() before apply the mod, as the surface deform was added by code via modifiers.new(). Still looking for a way to do the bind without the bpy.ops – MACHIN3 Jun 16 '18 at 9:39

## 1 Answer

It turned out I had to do a scene.update() before applying the modifier, as the surface deform modifier was added by code via modifiers.new().

I'm still looking for a way to do the bind without the bpy.ops* however.