From 462a013d98b09312b6228c9b927f9f776e064a51 Mon Sep 17 00:00:00 2001 From: pullusb Date: Tue, 6 May 2025 10:01:13 +0200 Subject: [PATCH] copy paste : make baking optional, still default 3.3.5 - added: copy paste option to copy only existing frame without baking the whole move --- CHANGELOG.md | 4 ++++ OP_copy_paste.py | 7 +++++-- __init__.py | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65e4fc9..d426ff3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +3.3.5 + +- added: copy paste option to copy only existing frame without baking the whole move + 3.3.4 - fixed: Error when trying to load addon in 4.3.0+ (prevent loading without error, print about incompatibility in console) diff --git a/OP_copy_paste.py b/OP_copy_paste.py index 48d86e2..3591059 100644 --- a/OP_copy_paste.py +++ b/OP_copy_paste.py @@ -512,6 +512,9 @@ class GPCLIP_OT_copy_multi_strokes(bpy.types.Operator): def poll(cls, context): return context.object and context.object.type == 'GPENCIL' + bake_moves : bpy.props.BoolProperty(name='Bake Move', default=True, + description='Copy every frame where object has moved, else copy only existing frames)') + pressure : bpy.props.BoolProperty(name='pressure', default=True, description='Dump point pressure attribute (already skipped if at default value)') strength : bpy.props.BoolProperty(name='strength', default=True, @@ -534,6 +537,7 @@ class GPCLIP_OT_copy_multi_strokes(bpy.types.Operator): layout=self.layout layout.use_property_split = True col = layout.column() + col.prop(self, 'bake_moves') col.label(text='Keep following point attributes:') col.prop(self, 'pressure') col.prop(self, 'strength') @@ -544,7 +548,6 @@ class GPCLIP_OT_copy_multi_strokes(bpy.types.Operator): return def execute(self, context): - bake_moves = True skip_empty_frame = False org_frame = context.scene.frame_current @@ -559,7 +562,7 @@ class GPCLIP_OT_copy_multi_strokes(bpy.types.Operator): self.report({'ERROR'}, 'No layers selected in GP dopesheet (needs to be visible and selected to be copied)\nHint: Changing active layer reset selection to active only') return {"CANCELLED"} - if not bake_moves: # copy only drawed frames as is. + if not self.bake_moves: # copy only drawed frames as is. for l in layerpool: if not l.frames: continue# skip empty layers diff --git a/__init__.py b/__init__.py index 830ed46..9009f10 100755 --- a/__init__.py +++ b/__init__.py @@ -4,7 +4,7 @@ bl_info = { "name": "GP toolbox", "description": "Tool set for Grease Pencil in animation production", "author": "Samuel Bernou, Christophe Seux", -"version": (3, 3, 4), +"version": (3, 3, 5), "blender": (4, 0, 0), "location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties", "warning": "",