-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Set position to zero when saving a positioned branch as scene #80561
Set position to zero when saving a positioned branch as scene #80561
Conversation
Looks alright on the technical side, but you need to change your code. Assignments inside expressions are generally not allowed and here you even made 2 at once. Also I wonder if this needs a proper proposal. While the new behavior is more useful, some users might rely on the origin not being reset, because it's useful for their workflow for whatever reason. |
I wasn't sure about that and had a look at the C++ usage guidelines. If that is not allowed here it should be listed there IMHO. But sure I can rewrite it.
I try to avoid proposals whenever possible, sorry for that, but it just feels as if they never get anywhere. But if you think it might help, sure. |
Right, it's probably an oversight. The topic was discussed a few times and there was a decision against this coding style, but was never formalized.
Proposals have a bit more visibility than a random PR closing a random issue that was opened very recently. I think this change is fine, but it's better to get some broader feedback. EDIT: |
I noticed this was an annoying issue for new people getting into Godot so I was looking at making my own PR/Proposal for it and stumbled upon this. Was this abandoned/denied or was there a reason this is set to draft mode? |
Looks abandoned. |
I made it a draft when I opened a proposal for it and forgot to mark it for ready when the proposal was closed. But I think I haven't fixed up KoBeWi's notion about assignments inside expressions. (Didn't wanted to work on it while the proposal was active) |
I added a question to the older proposal which didn't receive any feedback so here it is again: do we need a checkbox for it? Because if so it needs to be reworked. So yeah kinda waiting for feedback rn. |
Ah I see, I'll put my personal opinion over on the proposal thread based on things that I've seen from other people using the engine |
Based on #39754, I think non-centered scenes are a use-case that still should be supported. So indeed some checkbox/option (enabled by default) should be added. |
@HolonProduction Do you want to continue the work you did on this? I'm not currently working on it because you were before but if you give me the go ahead I'll immediately hop on it as I really care about this feature being completed |
@Bitlytic go ahead! I'm currently more focused on auto completion and don't have much time anyway. |
I'm getting around to this now, you mentioned that it should be enabled by default. I just wanna make sure, you want the new version that saves the branch at (0, 0, 0) to be the version used by default or what's live in Godot 4 to be the default? |
The new version should be default. |
This is a particularly desired even a year later. @HolonProduction could you rebase, so that someone could hopefully take a look at it for be merged soon? |
Thing is, that apparently we want a checkbox to control this behavior and I never implemented that. So if this is still a requirement, this will need a bit more than a rebase I guess. |
c7b80bb
to
2892156
Compare
So I added check boxes to the file dialog: It might make sense to alter the way the options are displayed, to use a Also there are no API's to hide the options, which means they would also be visible when saving a node that is neither |
This is a feature my team has wanted for a long time now, so I'll offer my opinion here. It seems rare that anyone (in a 3D project, at least?) would want to reset only the position, and not also the rotation and scale. I see that the option defaults (true, false, false) are hard-coded. Should these be made into editor settings like |
I would have them disabled instead of hidden. But I assume you mean there's no way to infer what type is being saved, which is a pity.
These kinds of settings are usually stored per-project separately. Although, I'm not sure how at the moment. |
No, inferring that before the dialog is shown would be possible through the current selection (that's how it is done after a file path was chosen anyway). But
That's an interesting idea, for now I'd rather keep this PR at its current state and leave this open for a possible follow up. I don't know yet how this would be done, and I hope we can get this in for 4.4, so I don't want to delay it further. |
2892156
to
03c3c5f
Compare
Thanks! |
Fixes #80560
The usability problem results from Godot keeping the state of an instanced scene in sync. This is an important feature and can't be fixed. However by changing the position in the new scene to zero the situation where it becomes a problem for the user is avoided.