Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-724 Fix copy-n-paste between two orchestrations #810

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

Naros
Copy link
Member

@Naros Naros commented Sep 21, 2024

Fixes #724

This change allows the copy-n-paste of nodes that call script functions, emit script signals, or get or set script variable values. The granular behavior for each node type is as follows:

  • Emit Script Signal Node

    • If the signal does not exist, it's created before the emit signal node is placed.
    • If the signal exists with the name, but the definition differs, an error is displayed & paste fails.
    • If the signal exists with the same name and the definition matches, the emit signal node is placed only.
  • Get/Set Variable Node

    • If the variable does not exist, it's created before the get/set variable node is placed.
    • If the variable exists with the same name but is defined differently, an error is displayed & paste fails.
    • If the variable exists with the same name and the definition matches, the get/set variable node is placed only.
  • Call Script Function

    • If the script function does not exist, an error is displayed & paste fails.
    • If the script function with the same name exists but is defined differently, an error is displayed & paste fails.
    • If the script function with the same name exists and the definition matches, the call script function node is placed only.

The goals of this change were primarily to avoid the crash that users were previously experiencing, but to also make the copy and paste across Orchestrations much easier. For script functions, it's expected that users would create the function first in the target orchestration before pasting any nodes that call such function. This also means that the contents of the script function itself isn't automatically copied & pasted when copying a "call script function" node.

In addition to the above, when selecting nodes and pressing the ui_copy (Ctrl+C) operation, if a node cannot be duplicated such as event nodes, rather than printing a message to the Output Panel, users will be presented a dialog window instead and the clipboard will not be populated. Users will need to unselect such nodes and re-execute the copy operation.

@Naros Naros added cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 cherrypick:2.1 Requires cherry-pick to Orchestrator 2.1 labels Sep 21, 2024
@Naros Naros added this to the 2.2 milestone Sep 21, 2024
@Naros Naros merged commit 42d2626 into CraterCrash:main Sep 21, 2024
8 checks passed
@Naros Naros deleted the GH-724 branch September 21, 2024 19:16
@Naros Naros removed cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 cherrypick:2.1 Requires cherry-pick to Orchestrator 2.1 labels Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copying Variables crashes Godot
1 participant