From 0befe74d8b43f72f29377f6868d1aea329e6ed8f Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Sat, 2 Apr 2011 11:19:19 +0000
Subject: [PATCH] update for changes in blenders api.

---
 mesh_bsurfaces.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py
index 18697d118..5c007c59a 100644
--- a/mesh_bsurfaces.py
+++ b/mesh_bsurfaces.py
@@ -270,11 +270,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
         else:
             #### Vheck if there is a grease pencil layer. If not, quit.
             try:
-                for i in range(len(self.main_object.grease_pencil.layers)):
-                    if self.main_object.grease_pencil.layers[i].active:
-                        gp_active_layer_idx = i
-                        
-                x = self.main_object.grease_pencil.layers[gp_active_layer_idx].active_frame.strokes
+                x = self.main_object.grease_pencil.layers.active.active_frame.strokes
             except:
                 return{'CANCELLED'}
                 
-- 
GitLab