wip copy-move keys
parent
63f377d7d1
commit
d3e4072564
|
@ -41,7 +41,7 @@ class GPTB_OT_duplicate_send_to_layer(Operator) :
|
|||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.object and context.object.type == 'GREASEPENCIL'\
|
||||
and context.space_data.bl_rna.identifier == 'SpaceDopeSheetEditor' and context.space_data.ui_mode == 'GREASEPENCIL'
|
||||
and context.space_data.bl_rna.identifier == 'SpaceDopeSheetEditor' and context.space_data.ui_mode == 'GPENCIL'
|
||||
|
||||
# history : bpy.props.StringProperty(default='', options={'SKIP_SAVE'}) # need to have a variable to store (to get it in self)
|
||||
|
||||
|
@ -67,6 +67,7 @@ class GPTB_OT_duplicate_send_to_layer(Operator) :
|
|||
for f in reversed(to_replace):
|
||||
target_layer.frames.remove(f)
|
||||
|
||||
# FIXME : need to createa a dedicated function to copy a frame
|
||||
## Copy original frames
|
||||
for f in selected_frames:
|
||||
target_layer.frames.copy(f)
|
||||
|
@ -131,7 +132,7 @@ def unregister_keymaps():
|
|||
|
||||
|
||||
def menu_duplicate_and_send_to_layer(self, context):
|
||||
if context.space_data.ui_mode == 'GREASEPENCIL':
|
||||
if context.space_data.ui_mode == 'GPENCIL':
|
||||
self.layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
self.layout.operator('gp.duplicate_send_to_layer', text='Move Keys To Layer').delete_source = True
|
||||
self.layout.operator('gp.duplicate_send_to_layer', text='Copy Keys To Layer')
|
||||
|
|
|
@ -165,7 +165,7 @@ class GPTB_OT_move_material_to_layer(Operator) :
|
|||
|
||||
|
||||
# def menu_duplicate_and_send_to_layer(self, context):
|
||||
# if context.space_data.ui_mode == 'GREASEPENCIL':
|
||||
# if context.space_data.ui_mode == 'GPENCIL':
|
||||
# self.layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
# self.layout.operator('gp.duplicate_send_to_layer', text='Move Keys To Layer').delete_source = True
|
||||
# self.layout.operator('gp.duplicate_send_to_layer', text='Copy Keys To Layer')
|
||||
|
|
Loading…
Reference in New Issue