Godot version:
master / 0de8309b2
OS/device including version:
Manjaro Linux 17.1
Issue description:
When creating an animation in an AnimationPlayer node (tested with a property track) by copying and pasting an existing animation, any edit on either of the animations would be applied to the other one as well, effectively defeating the purpose of copy & paste animations.
Copying and pasting an existing animation should create a new animation with the same tracks and keys which can be edited without affecting the source animation.
I was thinking about opening an issue about naming conventions. Right now it's really confusing for newcomers for no reason at all.
"Duplicate", "Copy and Paste" and "Create Instance" are used interchangeably while they are actually vastly different operations but sometimes do the same and then again different things within Godot. For example if you rightclick and select "Duplicate" a scene in the filebrowser panel, you create a true duplicate of that scene. Whereas if you rightclick and "Duplicate" a Node in the Scene Panel, you create an instance. One example of many.
@metaphoricalsasquash I agree that it's better to have consistent naming across the features. But I'm a bit confused as to what it means in the context of this issue.
Do you mean the symptom I described above could be an intended behavior? If so, could you please elaborate some use cases for it?
Animations are "resources" within Godot, I believe. I think that might be the reason why copy and paste results in an instance of that animation, not a duplicate copy by default. Though I absolutely agree with you: I don't think an instance is the expected result when a user performs a copy and paste operation.
In my opinion what is currently available should be called "set as instance source" (right now known as copy) and "paste animation instance" (right now known as paste), and then there should also be a proper copy and paste, which does not create an instance/link/reference to an already existing animation, but just copy all keys and values and past them someplace else. Ideally via Ctrl+C, Ctrl+V or right click context menu in addition to the pull down menu.
Oh, now I see why you are suspecting this could be the intended behavior. As to animations in AnimationPlayer though, I can't think of any real use case where you want to add the exact same animations under different names which is what the current copy & paste operation results, as you agree that it's not usually what users would expect.
Yes, I cannot think of any real usecase either. I can however think of million usecases where I would need real copy and paste functionality inside Godot.
Recently though, I tried to apply the same frame animation to multiple Sprites under one AnimationPlayer. Feel free to check it out: #22421
Yes, I agree the default behavior should definitely be a deep copy of the AnimationPlayer node when it is duplicated. The same issue exists with CollisionShape nodes, however, with CollisionShapes there is an option called "Make Unique" in the Shape dropdown that makes a copy instead of a shared reference. I don't recall seeing such an option for AnimationPlayers.
If copy isn't the default behavior for AnimationPlayer nodes, then the Make Unique option should at least exist.
"Make unique" is what the rest of the world calls a "copy".
Please Godot, make this the default, enable select->Ctrl+C->Ctrl+V, give us proper copy and paste!
Those who want so use it as shared reference can still save the animation and use that saved file, which should not be automatically connected to the file it was saved from, elsewhere.
Closing in favor of #24950, which is more accurate.
Most helpful comment
Yes, I cannot think of any real usecase either. I can however think of million usecases where I would need real copy and paste functionality inside Godot.
Recently though, I tried to apply the same frame animation to multiple Sprites under one AnimationPlayer. Feel free to check it out: #22421