diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-11-15 12:36:16 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-11-15 12:36:16 +0400 |
commit | 2d6909ddbbb7dd45030647c9f9daddf9ae1302a5 (patch) | |
tree | a8de5d386c7455efae163f69be2f4cb64e44028a | |
parent | e86e443caf949b6060196fe066756af866617620 (diff) |
Should fix the problem with bsurfaces (did not test deeply, though, not used to this tool...).
-rw-r--r-- | mesh_bsurfaces.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py index 2f33ed67..bd43513a 100644 --- a/mesh_bsurfaces.py +++ b/mesh_bsurfaces.py @@ -2987,8 +2987,13 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): if self.strokes_type == "GP_STROKES": # Convert grease pencil strokes to curve. bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN') - bpy.ops.gpencil.convert('INVOKE_REGION_WIN', type='CURVE') - self.original_curve = bpy.context.object + bpy.ops.gpencil.convert('INVOKE_REGION_WIN', type='CURVE', use_link_strokes=False) + # XXX gpencil.convert now keep org object as active/selected, *not* newly created curve! + # XXX This is far from perfect, but should work in most cases... +# self.original_curve = bpy.context.object + for ob in bpy.context.selected_objects: + if ob != bpy.context.scene.objects.active and ob.name.startswith("GP_Layer"): + self.original_curve = ob self.using_external_curves = False elif self.strokes_type == "EXTERNAL_CURVE": for ob in bpy.context.selected_objects: |