I'm going to write a script that adds Surface DevelopmentDeform Modifier to multiple objects in batches and binds it to the target object.
I succeeded in adding a Modifier to all selected objects and setting a target object, but failed to bind. Currently, my script runs Bind operation only for the active object.
How can I fix my script?
import bpy
obs = bpy.context.selected_objects
modifier_type = 'SURFACE_DEFORM'
modifier_target = bpy.data.objects['Plane']
for ob in obs :
ob.modifiers.new(name=modifier_type,type=modifier_type)
ob.modifiers[modifier_type].target=modifier_target
bpy.ops.object.surfacedeform_bind(modifier=modifier_type)