[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4067] trunk/py/scripts/addons/ mesh_bsurfaces.py: Grease pencil convertion to curves and their selection is now adapted to Blender 2 .65, both for "Edit Strokes" and "Reorder Splines" features.
Eclectiel L
eclect25 at yahoo.com
Wed Dec 19 03:45:37 CET 2012
Revision: 4067
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4067
Author: eclectiel
Date: 2012-12-19 02:45:32 +0000 (Wed, 19 Dec 2012)
Log Message:
-----------
Grease pencil convertion to curves and their selection is now adapted to Blender 2.65, both for "Edit Strokes" and "Reorder Splines" features.
Modified Paths:
--------------
trunk/py/scripts/addons/mesh_bsurfaces.py
Modified: trunk/py/scripts/addons/mesh_bsurfaces.py
===================================================================
--- trunk/py/scripts/addons/mesh_bsurfaces.py 2012-12-18 22:20:41 UTC (rev 4066)
+++ trunk/py/scripts/addons/mesh_bsurfaces.py 2012-12-19 02:45:32 UTC (rev 4067)
@@ -3260,9 +3260,13 @@
elif self.strokes_type == "GP_STROKES" or self.strokes_type == "SINGLE_GP_STROKE_NO_SELECTION":
#### 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
+ bpy.ops.gpencil.convert('INVOKE_REGION_WIN', type='CURVE', use_link_strokes=False)
+ for ob in bpy.context.selected_objects:
+ if ob != bpy.context.scene.objects.active and ob.name.startswith("GP_Layer"):
+ ob_gp_strokes = ob
+ #ob_gp_strokes = bpy.context.object
+
#### Delete grease pencil strokes.
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
bpy.data.objects[self.main_object.name].select = True
@@ -3319,9 +3323,12 @@
objects_to_delete = []
#### Convert grease pencil strokes to curve.
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
- bpy.ops.gpencil.convert('INVOKE_REGION_WIN', type='CURVE')
+ bpy.ops.gpencil.convert('INVOKE_REGION_WIN', type='CURVE', use_link_strokes=False)
+ for ob in bpy.context.selected_objects:
+ if ob != bpy.context.scene.objects.active and ob.name.startswith("GP_Layer"):
+ GP_strokes_curve = ob
- GP_strokes_curve = bpy.context.object
+ #GP_strokes_curve = bpy.context.object
objects_to_delete.append(GP_strokes_curve)
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
More information about the Bf-extensions-cvs
mailing list