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

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.