# Copying keyframe to one sequence to another using python

**URL:** <https://forums.unrealengine.com/t/copying-keyframe-to-one-sequence-to-another-using-python/2495037>\
**Category:** Character & Animation\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [April 7, 2025, 3:10pm UTC](https://forums.unrealengine.com/t/copying-keyframe-to-one-sequence-to-another-using-python/2495037 "2025-04-07T15:10:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 7, 2025, 3:10pm UTC](https://forums.unrealengine.com/t/copying-keyframe-to-one-sequence-to-another-using-python/2495037/1 "2025-04-07T15:10:23Z")

</div>

Hi everyone,

what I’m trying to achieve is conceptually very simple: I’d like to understand if it’s possible to create a button in a utility widget editor that essentially copies all the keyframes of the _transform track_ of a cube from the **cam01** sequence to the same track of the cube in the **cam02** sequence, all using Python.

So basically if you take a look at the CAM01.JPG, what i want is to take all the keyframes from the **cube** track _transform_ in CAM01 sequence and copy everything to **cube** track _transform_ in the CAM02 sequence by pressing a button on the basic ui (connecting an execute python script node to the “onClicked” function of a button

Furthermore, I would like to know if it’s possible to copy the keyframe previous to the current one and set it to the current one, still using Python.

You can follow at the pic “Folder\_Location.JPG” to catch the correct files, even for the basic ui

I’ve also attached the basic scene that i was using for this little test, hope can help. If you need anything else or more clarification, please let me know.

Thank you in advance for your support,

Luca

---

<div class="post-metadata">

**Author:** ![DDeVoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ddevoe/32/1000886_2.png) [@DDeVoe](https://forums.unrealengine.com/u/DDeVoe)\
**Post date:** [April 7, 2025, 5:15pm UTC](https://forums.unrealengine.com/t/copying-keyframe-to-one-sequence-to-another-using-python/2495037/2 "2025-04-07T17:15:53Z")

</div>

Hey there,

Yes this is possible. There are a couple of references to help you out.

For EUW, this link shows you how to run a python command or file from blueprint. You can use this to bind your python event.

[https://dev.epicgames.com/documentation/en-us/unreal-engine/scripting-the-unreal-editor-using-python#fromeditor-onlyblueprints](https://dev.epicgames.com/documentation/en-us/unreal-engine/scripting-the-unreal-editor-using-python#fromeditor-onlyblueprints)

For scripting sequencer commands, there are two resources you’ll want to look at:

[https://dev.epicgames.com/documentation/en-us/unreal-engine/python-scripting-in-sequencer-in-unreal-engine#copyandpastecommands](https://dev.epicgames.com/documentation/en-us/unreal-engine/python-scripting-in-sequencer-in-unreal-engine#copyandpastecommands)

and inside

`…\Engine\Plugins\MovieScene\SequencerScripting\Content\Python\sequencer_key_examples.py`To copy the keys, you’ll be grabbing the values of the keys you want from _cube1’s_ properties and then creating new keys on _cube2_ properties\*.\*

Hope this gets you on the right track.
