X Tutup
Skip to content

Add ability to transform nodes relative to the active node#104233

Open
ryevdokimov wants to merge 1 commit intogodotengine:masterfrom
Open-Industry-Project:relative-transform
Open

Add ability to transform nodes relative to the active node#104233
ryevdokimov wants to merge 1 commit intogodotengine:masterfrom
Open-Industry-Project:relative-transform

Conversation

@ryevdokimov
Copy link
Contributor

@ryevdokimov ryevdokimov commented Mar 16, 2025

#102176 introduced the ability to select an active node to determine the basis of the transform gizmo. This PR adds the ability to transform nodes relative to that basis now. This will the improve the usability of transforming several nodes at once.

A new tool button has been added:

image

This button is only enabled when the adjacent Use Local Space tool is enabled, and the functionality is automatically disabled when switching back to global space.

2025-03-16.17-29-11.mp4

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected. Code looks good to me.

Some feedback:

  • The default shortcut (A) will conflict with the physical Q shortcut from #103533 on AZERTY keyboards. I suggest making it use physical A, so that it becomes Q on AZERTY to avoid conflicts.
  • The feature's state is not persisted when disabling Use Local Space. This also means that if you use Blender-style manipulation shortcuts, it's impossible to make use of the feature as you always have to go through global space before going through local space (by pressing the manipulation shortcut a second time).
  • The tooltip should mention that the feature is only effective when Use Local Space is enabled (so users know why it appears grayed out by default).

@fire fire requested review from a team and fire July 9, 2025 03:22
@ryevdokimov ryevdokimov force-pushed the relative-transform branch from 647c526 to ff79c80 Compare July 9, 2025 10:20
@ryevdokimov
Copy link
Contributor Author

Feedback addressed.

Also fixed saving state when project is reloaded.

@ryevdokimov ryevdokimov requested a review from Calinou July 9, 2025 10:29
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great now 🙂

Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're following Blender's gui, I think we should also allow setting the Origin separately. However, I understand the concern that this might add too many features.

Even so, the current this PR implementation seems inconsistent regarding position, rotation, and scaling, making it unclear what the intended purpose is. The icons are also unclear.

So as a proposal, how about implementing most operations the same as Global, but only setting the Gizmo's transform to Local:

  • Ignore EachOrigin
  • Set the Gizmo's position to match the leader object's Origin, not the average position
  • Set the Gizmo's basis to match the leader object's Basis

Also, I think it's okay to make this Local Gizmo + Global Operation the default.

Then, representing the current Each Origin + Local Operation with the following icons would make the behavior clearer:

EachBasis

@Repiteo Repiteo requested review from a team as code owners February 17, 2026 20:10
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

X Tutup