# Using Python to programmatically bend a box

I'm trying to write a script that uses bpy.ops.transform.bend and am running into context issues.

I'm just learning the api but it seems like the command requires some sort of UI interaction/context to be able to be performed.

I've read elsewhere that some of these operations can be overridden, and I'm wondering if it's possible to do so for the bend operation.

I'm trying to use this code:

bpy.ops.transform.bend(value=(1.10023,), mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)


Result:

RuntimeError: Operator bpy.ops.transform.bend.poll() expected a view3d region

• You can override context (as you can see here blender.stackexchange.com/questions/15118/…), but this seems like an operator that actually needs manual feedback, and is highly dependent on mouse cursor relative position and view angle. Might want to consider using something else. – TLousky Aug 20 at 12:05