[Bf-extensions-cvs] [33a0a0b7] master: Addon: BSurfaces: Fixed bug

Spivak Vladimir cwolf3d noreply at git.blender.org
Sun Oct 13 15:37:47 CEST 2019


Commit: 33a0a0b7a8eac7e601605a02f978b253d1db543a
Author: Spivak Vladimir (cwolf3d)
Date:   Sun Oct 13 16:37:14 2019 +0300
Branches: master
https://developer.blender.org/rBA33a0a0b7a8eac7e601605a02f978b253d1db543a

Addon: BSurfaces: Fixed bug

===================================================================

M	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"}



More information about the Bf-extensions-cvs mailing list