From 33a0a0b7a8eac7e601605a02f978b253d1db543a Mon Sep 17 00:00:00 2001 From: "Spivak Vladimir (cwolf3d)" Date: Sun, 13 Oct 2019 16:37:14 +0300 Subject: Addon: BSurfaces: Fixed bug --- mesh_bsurfaces.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mesh_bsurfaces.py') diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py index 9e9ae09d..731acb68 100644 --- a/mesh_bsurfaces.py +++ b/mesh_bsurfaces.py @@ -20,7 +20,7 @@ bl_info = { "name": "Bsurfaces GPL Edition", "author": "Eclectiel, Spivak Vladimir(cwolf3d)", - "version": (1, 7, 1), + "version": (1, 7, 2), "blender": (2, 80, 0), "location": "View3D EditMode > Sidebar > Edit Tab", "description": "Modeling and retopology tool", @@ -3502,7 +3502,8 @@ class GPENCIL_OT_SURFSK_init(Operator): bs = bpy.context.scene.bsurfaces - bpy.ops.object.mode_set('INVOKE_REGION_WIN', mode='OBJECT') + if bpy.ops.object.mode_set.poll(): + bpy.ops.object.mode_set('INVOKE_REGION_WIN', mode='OBJECT') global global_color global global_offset @@ -3567,7 +3568,9 @@ class GPENCIL_OT_SURFSK_init(Operator): bpy.context.scene.tool_settings.annotation_stroke_placement_view3d = 'SURFACE' if context.scene.bsurfaces.SURFSK_guide == 'Curve': - bpy.data.objects[global_mesh_object].data.vertices.add(1) + #bpy.data.objects[global_mesh_object].data.vertices.add(1) + if bpy.ops.object.mode_set.poll(): + bpy.ops.object.mode_set('INVOKE_REGION_WIN', mode='EDIT') return {"FINISHED"} -- cgit v1.2.3