0

Looks like the bsurface addon is not supported officially according to this answer. It works fine when I am clicking on "Add Surface" button from GUI , but when I execute from script

bpy.ops.gpencil.surfsk_add_surface(edges_U=50, edges_V=20, cyclic_cross=False, cyclic_follow=False, loops_on_strokes=True, automatic_join=True)

AttributeError: 'GPENCIL_OT_SURFSK_add_surface' object has no attribute 'is_fill_faces'

This definitely doesn't feel like a context error, but more to do with the addon.

I would like to know if there is a fix for this problem ? Or otherwise please suggest what alternatives to look for bsurfaces addon that go well with scripting as well ?

Nitish Reddy
  • 162
  • 7

1 Answers1

0

Unlike

bpy.ops.gpencil.surfsk_add_surface(edges_U=50, edges_V=20, cyclic_cross=False, cyclic_follow=False, loops_on_strokes=True, automatic_join=True)

this

bpy.ops.gpencil.surfsk_add_surface('INVOKE_DEFAULT')

this works from script as well

but one drawback is we will not be able to pass edges_U & edges_V from code

for that I modified the addon itself in line 2970

self.edges_U = bpy.context.scene.edges_U
self.edges_V = bpy.context.scene.edges_V

I do the required calulcations and store them in bpy.context.scene & assign them in the addon code.

Hope this temporary hack can be used until the original authors fix the addon.

Nitish Reddy
  • 162
  • 7