Skip to content

Edit->Duplicate in the node graph makes extra duplicates of reused input nodes #2501

@cpelling

Description

@cpelling

Repro steps:

  1. Create a project with one Text node supplying input to two layers (or use the attached project).
  2. Drag-select the two layers and their input nodes.
    • In the attached project, use the bottom two layers, with the text "Shut up and take my money!"
  3. Choose Edit -> Duplicate.
    • It seems necessary to use the menu option, NOT the Ctrl-D keyboard shortcut, as odd as that sounds.

Expected result: The selected nodes are duplicated exactly once, adding two new layers.

Observed result: In addition to the expected result, we now have one copy of the original Text node for each of the original two layers. This is almost impossible to notice since they overlap perfectly. See below for a more detailed explanation.

Suggested fix:

  • Don't make extra copies of the re-used input nodes.
  • For extra points, systemically prevent the case of nodes ever having exactly the same x and y coordinates in the node graph. When this happens it is REALLY confusing.

Details: In the attached project, I was attempting to create a "shadow" or outline for some meme text, using multiple layers. I reused the Text and Transform nodes for both layers using the node graph editor (see screenshot).

Later, I wanted a second line of text, so I box-selected my two layers and their input nodes and chose Edit -> Duplicate. This mostly worked, apart from some messed up wiring.

Even later, I tried to edit the top line of text and was confused as to why my edits were applying only to the white text and not the black text shadow:

Image

Eventually I realised the topmost Text node is actually TWO Text nodes, perfectly overlapping so it's impossible to see. Here I've moved them slightly to demonstrate (note, the graph structure is identical to the above image):

Image

I can reproduce this by similarly duplicating the bottom two layers with the text "Shut up and take my money".

invalidate-cache.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Short-Term

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions