-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Allow keying properties when selecting multiple nodes #92842
Conversation
I figured it made sense to have |
cf12f5e
to
13fc7df
Compare
13fc7df
to
51fca65
Compare
51fca65
to
351f454
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works correctly.
Could use a look from @TokageItLab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working well.
Thanks! |
MultiTrackDrifting.mp4
Currently it's not possible to key properties for animation tracks when having multiple nodes selected in the scene tree, as pointed out among the many quality-of-life improvements in this proposal (as "Add several tracks/keyframes when several nodes are selected").
This seemed fairly straight-forward to address, by simply allowing the keying to not only work on
Node
but also onMultiNodeEdit
, which is exactly what this PR does.One thing that's perhaps up for debate in terms of UX is what value should be put into the keys when you have multiple nodes selected, given that
MultiNodeEdit
will display the value from the first selected node, even if the values of the multiple nodes differ. It seemed to me that the most intuitive implementation was to have each node's respective value entered into their respective keys, rather than the value of the first selected node be entered into all nodes' keys. For this reason thep_value
passed intoAnimationPlayerEditorPlugin::_property_keyed
is now ignored and fetched from each respective node instead.(I would perhaps also argue that
MultiNodeEdit
shouldn't work this way to begin with, and should render the value/control in some other way when the values differ between the nodes, which I believe is how Unreal does it, and perhaps other editors as well, but that's a separate discussion.)In the process of doing this I felt the need to create a new method in
AnimationTrackEditor
that would be similar toinsert_value_key
but which accepted a specificNode
instead and found that there was already such a method, calledinsert_node_value_key
, so I made use of that instead (with some tweaks). The only major difference between these that I could spot was the inclusion ofmake_insert_queue
andcommit_insert_queue
in the oldinsert_value_key
, which I left in the now refactoredinsert_value_key
. I welcome feedback as to whether this approach might have some unintended consequences.