7

(Note: Somebody asked there nearly the same question as me and got a very nice answer. However, this was to convert an object to a mesh. I have exactly the same context as this person but I want to convert a mesh to a curve and the answer does not adapt. Hence I am copying the question's text below, adapting the appropriate parts.

I'm using bpy.ops.object.convert(target='Curve') in a Python function in Blender to convert the product of a bisect(clear_inner, clear_outer) to a curve, with the goal to bevel this curve later. The script works fine when run from the Text Editor. However, the goal is to add the function to the render events via bpy.app.handlers.render_pre.append().

When the function using bpy.ops.object.convert is used in the handler, a polling error occurs. The typical recommendation is to either use overrides or low-level functions to eliminate the polling/context error. I would like to use the low-level functions.

Harry McKenzie
  • 10,995
  • 8
  • 23
  • 51
Arnaud
  • 183
  • 5

0 Answers0