-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Fix transform gizmo local space mode when multiple nodes are selected #102176
base: master
Are you sure you want to change the base?
Fix transform gizmo local space mode when multiple nodes are selected #102176
Conversation
According to when I asked, this was to match Blender behaviour #68804
I'll ask @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.
It might okay to handle this in cases where all selected objects are in the same direction, but it makes no sense in other cases.
For example, if object A's local +Z axis points to +Z in the world and object B's local +Z axis points to -Z in the world, a move to +Z with multiple selection in local mode will move each in the opposite direction.
So from a GUI perspective, it may be appropriate not to move Gizmo out of place when moving. At this time, I assume that the movement of translation can be calculated using averaging, but basis cannot be averaged. Therefor the only way at this stage for consistent behavior is to use the world visually.
The best way would be to visually duplicate TransformGizmo for the number of selected objects IMO, but this would require a fair amount of overhaul work.
Another way I can think of is to decide/select (in a way that the user can explicitly handle it) on one leader for multiple selections and use that basis, as in Blender, but this case does not solve the visual problem when each has a different local basis. This will also make it tempting to implement a new mode that ignores each local axis.
Yes, I see now that although it does select a leader in the gizmo basis, the computation of the transform is still independent which leads to unintuitive behavior. I will see if I can solve the approach of having the computed transform match the leader. |
36f8360
to
3bae8f7
Compare
3bae8f7
to
4e6eafe
Compare
4e6eafe
to
b5ddc1c
Compare
The basis of the gizmo did not update correctly when switching to local space mode and multiple nodes are selected. Note in the before video that despite the gizmo still being rotated for global space, the transform was computed in local space. I'm not sure why the limitation to a single selected node existed in the first place, it seems to be deliberately added, but I can't find any issues removing it during testing.
Before:
2025-01-30.09-56-29.mp4
After:
2025-01-30.09-54-40.mp4