-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Only store _edit_use_anchors_
metadata if value is not the default
#57863
Only store _edit_use_anchors_
metadata if value is not the default
#57863
Conversation
The pull request build seems to work for me. New scenes no longer have that setting written into them it seems. But during testing I ran into another issue. You cannot undo a toggle of the anchor button? Maybe I will open a new issue? Thanks. |
Does this happen without this PR? |
Yes, in 3 and 4.
|
Use Anchors is an editor-only action, so I don't think it makes sense to be tracked in undo/redo. It would be like tracking selection of 2D/3D nodes in the editor as an undoable action. There is no project data being changed here, only data being read. Most other applications don't track such operations in their undo/redo state. |
Ya sorry, I agree, I guess I still thought it was doing the the |
Really this should be moved out of the scene file. We don't need to store local editor specifics in version-controlled scene files, this kind of data would have a better home in the |
Do we have examples of other per-node properties stored in there? This is similar to I agree in principle, but there is also an argument to be made that this needs to be synced and needs to be attached to the node. |
This PR needs a rebase/remake since the relevant code is now in |
The default value is assumed to be `false`, so this metadata only needs to be stored if the value is `true`.
701c8fb
to
7ca843b
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.
The change seems to be straightforward.
@rakkarage has a point though. In one case we save this editor-only flag as a part of UndoRedo, and in another we don't. But that's existing behavior, so I think it's a non-blocker for this PR.
Thanks! |
Could use a dedicated backport for |
master
version of #58254.The default value is assumed to be
false
, so this metadata only needs to be stored if the value istrue
.This closes #57862.
Bugsquad edit (keywords for easier searching): edit_use_anchors