rgthree-comfy icon indicating copy to clipboard operation
rgthree-comfy copied to clipboard

Updated clipboard API

Open webfiltered opened this issue 1 year ago • 0 comments

Just a heads up that there's a PR in to replace the copy & paste methods. I noticed you have some workarounds in place, and I'm hoping this will be good news for you.

Overview of changes

  • All items are run through serialize or asSerialisable
  • All links to the inputs of copied nodes are included
  • Nodes are still cloned as this behaviour is relied on in places, however original IDs are reinserted and copied
  • Links use the new Serialisable interface, serialising them as objects like everything else
  • Re-linking and ID mutation only occurs when pasting
  • Paste returns map of original IDs to pasted items (_paste method only, at present - public API later if no issues)

webfiltered avatar Nov 13 '24 11:11 webfiltered