option to disable move baking in gp clipboard copy operator
4.1.1 - added: option in copy stroke world space to not bake move
This commit is contained in:
parent
aecef47d2f
commit
34f8193c7b
@ -1,8 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
4.1.1
|
||||||
|
|
||||||
|
- added: option in copy stroke world space to not bake move
|
||||||
|
|
||||||
4.1.0
|
4.1.0
|
||||||
|
|
||||||
added: operator `list collection visibility conflicts` (not exposed, called from search menu with dev extras enabled in prefs)
|
- added: operator `list collection visibility conflicts` (not exposed, called from search menu with dev extras enabled in prefs)
|
||||||
|
|
||||||
4.0.3
|
4.0.3
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## GP clipboard : Copy/Cut/Paste Grease Pencil strokes to/from OS clipboard across layers and blends
|
## GP clipboard : Copy/Cut/Paste Grease Pencil strokes to/from OS clipboard across layers and blends
|
||||||
## View3D > Toolbar > Gpencil > GP clipboard
|
## View3D > Toolbar > Gpencil > GP clipboard
|
||||||
## in 4.2- existed in standalone scripts: https://github.com/Pullusb/GP_clipboard
|
## in 4.2, existed in standalone scripts: https://github.com/Pullusb/GP_clipboard
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import mathutils
|
import mathutils
|
||||||
@ -478,6 +478,9 @@ class GPCLIP_OT_copy_multi_strokes(bpy.types.Operator):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return context.object and context.object.type == 'GREASEPENCIL'
|
return context.object and context.object.type == 'GREASEPENCIL'
|
||||||
|
|
||||||
|
bake_moves : bpy.props.BoolProperty(name='Bake Move', default=True,
|
||||||
|
description='Copy every frame where object has moved, else copy only existing frames')
|
||||||
|
|
||||||
radius : bpy.props.BoolProperty(name='radius', default=True,
|
radius : bpy.props.BoolProperty(name='radius', default=True,
|
||||||
description='Dump point radius attribute (already skipped if at default value)')
|
description='Dump point radius attribute (already skipped if at default value)')
|
||||||
opacity : bpy.props.BoolProperty(name='opacity', default=True,
|
opacity : bpy.props.BoolProperty(name='opacity', default=True,
|
||||||
@ -502,6 +505,7 @@ class GPCLIP_OT_copy_multi_strokes(bpy.types.Operator):
|
|||||||
layout=self.layout
|
layout=self.layout
|
||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
|
col.prop(self, 'bake_moves')
|
||||||
col.label(text='Keep following point attributes:')
|
col.label(text='Keep following point attributes:')
|
||||||
col.prop(self, 'radius')
|
col.prop(self, 'radius')
|
||||||
col.prop(self, 'opacity')
|
col.prop(self, 'opacity')
|
||||||
@ -512,7 +516,6 @@ class GPCLIP_OT_copy_multi_strokes(bpy.types.Operator):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
bake_moves = True
|
|
||||||
skip_empty_frame = False
|
skip_empty_frame = False
|
||||||
|
|
||||||
org_frame = context.scene.frame_current
|
org_frame = context.scene.frame_current
|
||||||
@ -527,10 +530,10 @@ 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')
|
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"}
|
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:
|
for l in layerpool:
|
||||||
if not l.frames:
|
if not l.frames:
|
||||||
continue# skip empty layers
|
continue # skip empty layers
|
||||||
|
|
||||||
frame_dic = {}
|
frame_dic = {}
|
||||||
for f in l.frames:
|
for f in l.frames:
|
||||||
|
@ -4,7 +4,7 @@ bl_info = {
|
|||||||
"name": "GP toolbox",
|
"name": "GP toolbox",
|
||||||
"description": "Tool set for Grease Pencil in animation production",
|
"description": "Tool set for Grease Pencil in animation production",
|
||||||
"author": "Samuel Bernou, Christophe Seux",
|
"author": "Samuel Bernou, Christophe Seux",
|
||||||
"version": (4, 1, 0),
|
"version": (4, 1, 1),
|
||||||
"blender": (4, 3, 0),
|
"blender": (4, 3, 0),
|
||||||
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user