mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
disable undo/redo during extraction, fix frame num
This commit is contained in:
parent
baa6f35335
commit
7394e7284a
1 changed files with 3 additions and 1 deletions
|
|
@ -151,6 +151,7 @@ def application_launch():
|
|||
def export_template(backdrops, nodes, filepath):
|
||||
func = """function func(args)
|
||||
{
|
||||
scene.beginUndoRedoAccum("Publish: export template");
|
||||
// Add an extra node just so a new group can be created.
|
||||
var temp_node = node.add("Top", "temp_note", "NOTE", 0, 0, 0);
|
||||
var template_group = node.createGroup(temp_node, "temp_group");
|
||||
|
|
@ -168,7 +169,7 @@ def export_template(backdrops, nodes, filepath):
|
|||
};
|
||||
|
||||
// Copy-paste the selected nodes into the new group.
|
||||
var drag_object = copyPaste.copy(args[1], 1, frame.numberOf, "");
|
||||
var drag_object = copyPaste.copy(args[1], 1, frame.numberOf(), "");
|
||||
copyPaste.pasteNewNodes(drag_object, template_group, "");
|
||||
|
||||
// Select all nodes within group and export as template.
|
||||
|
|
@ -179,6 +180,7 @@ def export_template(backdrops, nodes, filepath):
|
|||
// created during the process.
|
||||
Action.perform("onActionUpToParent()", "Node View");
|
||||
node.deleteNode(template_group, true, true);
|
||||
scene.cancelUndoRedoAccum();
|
||||
}
|
||||
func
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue