Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEclectiel L <eclect25@yahoo.com>2012-12-19 06:45:32 +0400
committerEclectiel L <eclect25@yahoo.com>2012-12-19 06:45:32 +0400
commit8cb79fd3f44ecb5fa9e2260511b002a9c7b2d649 (patch)
tree139d78140f28594646d74d010648397a4230d86e /mesh_bsurfaces.py
parent2fda064ad7eebb0da50428158a6d973359a03b3a (diff)
Grease pencil convertion to curves and their selection is now adapted to Blender 2.65, both for "Edit Strokes" and "Reorder Splines" features.
Diffstat (limited to 'mesh_bsurfaces.py')
-rw-r--r--mesh_bsurfaces.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py
index bd43513a..650542a9 100644
--- a/mesh_bsurfaces.py
+++ b/mesh_bsurfaces.py
@@ -3260,8 +3260,12 @@ class GPENCIL_OT_SURFSK_edit_strokes(bpy.types.Operator):
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')
@@ -3319,9 +3323,12 @@ class CURVE_OT_SURFSK_reorder_splines(bpy.types.Operator):
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')