diff options
author | Eclectiel L <eclect25@yahoo.com> | 2011-04-11 01:13:15 +0400 |
---|---|---|
committer | Eclectiel L <eclect25@yahoo.com> | 2011-04-11 01:13:15 +0400 |
commit | 2ded65bdd64986bb87738989324fb5833fee3b55 (patch) | |
tree | 901b3d8f6e621428babcc0adee4554823d7af249 /mesh_bsurfaces.py | |
parent | d944bc51b860aed99620b5aa596f237d4c3c656b (diff) |
Updated the grease pencil layer conversion to work in Object mode instead of Edit mode, for GPENCIL_OT_SURFSK_add_surface and GPENCIL_OT_SURFSK_strokes_to_curves.
Diffstat (limited to 'mesh_bsurfaces.py')
-rw-r--r-- | mesh_bsurfaces.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py index 2e031b71..27114e2a 100644 --- a/mesh_bsurfaces.py +++ b/mesh_bsurfaces.py @@ -275,11 +275,14 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator): return{'CANCELLED'} #### Convert grease pencil strokes to curve. + bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN') bpy.ops.gpencil.convert('INVOKE_REGION_WIN', type='CURVE') ob_gp_strokes = bpy.context.object + + using_external_curves = False - bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN') + ob_gp_strokes.name = "SURFSK_temp_strokes" @@ -767,12 +770,12 @@ class GPENCIL_OT_SURFSK_strokes_to_curves(bpy.types.Operator): def execute(self, context): #### Convert grease pencil strokes to curve. + bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN') bpy.ops.gpencil.convert('INVOKE_REGION_WIN', type='CURVE') ob_gp_strokes = bpy.context.object ob_gp_strokes.name = "SURFSK_strokes" #### Delete grease pencil strokes. - bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN') bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT') bpy.ops.object.select_name('INVOKE_REGION_WIN', name = self.main_object.name) bpy.context.scene.objects.active = bpy.data.objects[self.main_object.name] @@ -851,4 +854,4 @@ def unregister(): if __name__ == "__main__": - register() + register()
\ No newline at end of file |