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

Add "Paste From Node Path" to scene tree #14810

Closed
wants to merge 1 commit into from

Conversation

poke1024
Copy link
Contributor

Add this:

menu

To allow to paste a node from the node path currently in clipboard to some location in the tree:

https://www.dropbox.com/s/4x0exn4p2rlzkl7/copy-paste-nodes.mp4?dl=0

I find this incredibly useful if I need to replicate items at different positions in the tree.

Notes:

(1) only uses the node path; i.e. if the node name changes or another node takes its name, the copied item changed accordingly (so users need to know what they're doing)
(2) only works inside one node tree (since only node paths are used)

This is currently a "paste before", such that ctrl+c + ctrl+v equals "Duplicate" and the pasted item always stays on the same level as the selected one; I also tried a "paste into", which is also useful, but maybe less intuitive for some people.

@groud
Copy link
Member

groud commented Dec 19, 2017

I would "paste after" instead of "paste before". It's usually what's done in most softwares.
Also the "Paste from node path" is a little bit confusing, maybe "Paste node" could be enough ? (Maybe it requires changing the label for "Copy node path" though)

@groud
Copy link
Member

groud commented Dec 19, 2017

But that's a great job, thanks ! ^^

@poke1024
Copy link
Contributor Author

Personally I don't think I've ever seen a paste after (can you give an example?). The classic thing is obviously paste-replace, as in a text editor that has a selection and gets this replaced by the paste. Paste before is something I've also seen in some places, as here in Affinity Designer (something like Adobe Illustrator) when pasting "SomeEllipse" onto other elements: https://www.dropbox.com/s/5l4rb5enar5fe7x/copy-paste-before.mp4?dl=0

Nothing against "Paste node", I just think it might confuse some people to think that their node content is actually copied into the clipboard when it's only the path that is held there.

@groud
Copy link
Member

groud commented Dec 19, 2017

Personally I don't think I've ever seen a paste after (can you give an example?).

Blender. If you do ctrl+c, ctrl+v on an object it does that:

toto-2017-12-19_21 15 54

But also in Krita, and probably photoshop too. I feel like Affinity designer is kind of an exception.

Nothing against "Paste node", I just think it might confuse some people to think that their node content is actually copied into the clipboard when it's only the path that is held there.

Well, I'd say people don't really care what's really inside the clipboard. But when you do ctrl+c, ctrl+v, the thing the engine does it copy and paste the node, not its path. I would say a clearer way would be something like that:

  • "Copy node (and node path)"
  • "Paste node"

Anyway, it's not that important. But as it took me time to understand what was your new entry was doing, I felt like it should be made clearer.

@poke1024
Copy link
Contributor Author

poke1024 commented Dec 20, 2017

Correct me if I'm wrong but what you see in Blender seems to be just the standard alphabetic ordering Blender enforces on all objects so AFAIK you cannot pick a position. If you ctrl-c ctrl-v ABC and XYZ inside Camera in the following tree, this is what you end up with (and therefore Cube.00n ends up in a list appended at the end):

blender

Also with Krita I'm not aware of anything like this (at least in the layer panel, where no copy paste works AFAIK). Maybe I'll take a look at Adobe products today.

To me, both these changes feel counter-intuitive, but for you guys it seems to be exactly the other way round. So I changed things around:

  • the new menu (note that the copy node text change affects translation tables):

new-menu

  • the new paste behavior:

paste-new

Note that we might get complaints that people copy a node, switch to a different scene and then wonder by their paste won't work.

EDIT Adobe Photoshop also pastes before, but now that I changed it, it doesn't matter :-/

@akien-mga
Copy link
Member

Thanks a lot for your contribution!
We are now entering a strict release freeze for Godot 3.0 and will only consider major bug fixes. We won't merge new features and enhancements anymore until 3.0 is released.

Moving this PR to the 3.1 milestone, to be reviewed once the release freeze is lifted. It could eventually be cherry-picked for a future 3.0.1 maintenance release if it doesn't change the user-facing APIs and doesn't compromise the engine's stability.

@akien-mga
Copy link
Member

I haven't checked in depth, but I think this PR and #13309 both try to address the same use case (albeit #13309 only does cut/paste yet, not copy). Which one would provide the best usability?

@akien-mga
Copy link
Member

So we now have three PRs for the same feature (#13309, #14810 and #19327) and implentation-wise we're preferring #19327 (though it still needs some more changes). Therefore closing as superseded by #19327. Thanks a lot for your work though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants