-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 an easy way to change target path in AnimationTrack #4847
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This issue is still present. I moved a node into a parent and it didn't update. I had to manually create en entire track again. |
I find locating the new path occasionally tricky, so my current workaround is:
This would be much easier with the ability to select a new target node, and take the same property. I like the idea of selecting a new target node for a single track, maybe even all the tracks on a node. One would still need to consider how to select the new target node. Does it restrict it to the same type of Node? Does the property dictate what kind of node can be switched to? If you changed the node path of two tracks together, like modulate and position, it would need to be a Node2D since that's the lowest class in the hierarchy. (vs CanvasItem) Change property might also be tricky if you could switch to a property of a different type. Maybe differently typed properties could be grayed out from the select property dialog? Like position could switch to scale since both are Vector2, but couldn't be switched to modulate which is a Color. Or force the property to be the same? |
I've recently started putting together an implementation for this proposal. (For my first contribution) My current planned solution is similar to what was mentioned above:
I'm planning to keep my changes in the scope of individual tracks, not the groups of tracks under a particular node, mentioned in a issue below. Filtering the SceneTree dialogue seems straightforward, haven't yet looked into filtering the property dialogue. I might drop "Change Property" if it seems like too much effort for one PR. Also related: Copy/Pasting tracks currently exist under the AnimationPlayer's Edit button. But between animations not to different nodes or properties. Issues related to the implementation of this proposal:
Issues somewhat related:
|
@jasonmorgado I came here looking for this kind of suggestion as I just broke an AnimationPlayer by moving it. Cool to see someone is already working on it. The AnimationPlayer.root_node has an Editor control that might be useful if it can be reused here or even just used as an example. The default click is a popup to change the target node rather than jump to it in the editor, which is instead under the context menu. That seems nicer to me than jumping being the default click behavior as you can just close the popup if it's not what you meant to do vs having to navigate back (I've been annoyed by that more than once...). Another option would be for clicking the node to offer more properties to add? Maybe turn all these behaviors into icons next to the node name instead of on the name itself? Not sure which approach is actually better as I'm new here and not sure what is best for workflow... On a related note, while your already looking at this, I would also suggest being able to collapse on the node in the track tree in order to hide the tracks under a give node. #444 had a LOT of properties keyed in that one skeleton and if you wanted to focus on animating a different node it would be nice to get all that out of the way. |
Describe the project you are working on
Just some game that uses animations.
Describe the problem or limitation you are having in your project
When using AnimationPlayer, you sometimes end up with invalid target property path. When you move or delete nodes, the tracks are updated automatically, but this sometimes fails. Aside from that, you might copy a track or copy animation or do something unexpected that will leave you with track pointing to a different node than you'd like to.
This is where the problems start. You can't change the target easily. All you have is some tiny text box that doesn't even display half of the path. You need to navigate this tiny space and manually type/paste your desired path. The usability of this is trash.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I'd like to have an option to easily pick new target node. Like, a right-click menu in the track editor that gives you an option "Change Target Node". When you select it, you are presented with node list on the scene and you can pick a new node. When you do so, the track path will be updated to the new node, keeping the property.
Changing property could be an option too, because why not.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
(context menu here)
If this enhancement will not be used often, can it be worked around with a few lines of script?
It requires editor modifications.
Is there a reason why this should be core and not an add-on in the asset library?
It's useful when working with animations.
The text was updated successfully, but these errors were encountered: