Skip to content
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

Remove Merge From Scene #45943

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Remove Merge From Scene #45943

merged 1 commit into from
Feb 18, 2021

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Feb 13, 2021

This PR removes Merge From Scene, which is useless after #34892 was merged.
Hopefully I didn't miss anything.

Resolves #32039 (copy-paste doesn't have this problem)

@KoBeWi KoBeWi added this to the 4.0 milestone Feb 13, 2021
@fire fire requested a review from a team February 13, 2021 03:59
@RandomShaper
Copy link
Member

Makes sense. However, it's a bit frightening, isn't it? 😝

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

I'm a bit concerned that it can appear as a workflow breakage for some users, at least until used to being able to copy paste... but there's still time to try it out until 4.0 is released, so let's remove it and see how the feedback is.

@akien-mga akien-mga merged commit 72f74eb into godotengine:master Feb 18, 2021
@akien-mga
Copy link
Member

Thanks!

@Koalamana9
Copy link

@akien-mga @KoBeWi @RandomShaper it was a workflow breakage for me! As I understand, I can now just select all the files in the scene and copy them to another one? Is it a safe workflow?

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 4, 2022

Yes, it's even safer than the merge from scene, because it automatically makes resources unique when necessary.

@Koalamana9
Copy link

@KoBeWi @RandomShaper @reduz The only problem I can't figure out is why the size of my scene is getting so big. Every time I copy a node from another scene containing a mesh, it is completely copied to the new scene, literally all mesh coordinates go directly to the tscn file in PoolByteArray, is this a normal behavior? Why not instantiate the original mesh file?
If I have a large enough number of detailed mesh objects that I want to copy into the main scene to build a level (but I don't want to copy them as separate scenes, I need the mesh directly) why is the mesh literally copied into the scene file? My tscn file is under 400mb, it's very strange...

@KoBeWi
Copy link
Member Author

KoBeWi commented Oct 6, 2022

What version are you using? It sounds like an old bug that should be fixed

@Zireael07
Copy link
Contributor

Zireael07 commented Oct 6, 2022

@KoxaKoxama It's likely making resources unique when it shouldn't, please open an issue with the project attached

@Koalamana9
Copy link

This is in 3.5.1 and 4.0b2
Here is my issue #66991

@PetBom
Copy link

PetBom commented Dec 15, 2022

@KoBeWi

I just noticed that "Merge From Scene" is missing from Godot 4 (Beta 8), and this PR confirms that it indeed is so.

I would challenge the initial assumption of this PR that Copy/Paste will replace the "Merge from scene" use cases.

"Merge from scene" is able to pick resources from a scene file (.tscn, .glb...) without actually importing the scene. This is a really useful feature that allow you to pick say just a mesh from a file for replacement without having to import/re-import a whole scene. I would go as far as suggesting that this is the primary use case for "Merge from scene"

This is a quite widely used use case in my workflow. I see no way that could be done with Copy/Paste functionality, but maybe I'm missing something.

@KoBeWi
Copy link
Member Author

KoBeWi commented Dec 15, 2022

"Merge from scene" is able to pick resources from a scene file (.tscn, .glb...) without actually importing the scene. This is a really useful feature that allow you to pick say just a mesh from a file for replacement without having to import/re-import a whole scene. I would go as far as suggesting that this is the primary use case for "Merge from scene"

I think I don't understand. When you copy a scene instance with any external references, the references are left unchanged. Only built-in references are copied (but merge from scene does the same, except it's bugged).

Did you try if copy-paste works with your use-case or are just asking theoretically?

@Zireael07
Copy link
Contributor

"Merge from scene" is able to pick resources from a scene file (.tscn, .glb...) without actually importing the scene. This is a really useful feature that allow you to pick say just a mesh from a file for replacement without having to import/re-import a whole scene. I would go as far as suggesting that this is the primary use case for "Merge from scene"

I must say I don't understand either. I've used copy and paste to do exactly this (extract a single mesh instance from a glb file)

@PetBom
Copy link

PetBom commented Dec 15, 2022

Ok. Maybe I'm explaining badly. Let me try again. Here's an example 3.5 scene to show my workflow:

image

Notice that I do not have an instance of the tree.glb in the project node tree. It is imported but not instantiated anywhere in the project. If i now right click the project node tree and use "Merge from scene":

image

Select file to import from...
image

Select node(s) to import...
image

And the selected node gets merged into the project node tree.
image

So this is the use case I'm trying to describe, and that I believe is missing from the Copy/Paste solution. I see no way to do the same maneuver without actually creating an instance of the tree.glb in the project node tree.

I could see ways that you could implement something similar using Copy/Paste instead. If you implemented Copy from the Advanced Import view Node tree.

As I've manly used the 3.5 "Merge from scene" to actually pick up different meshes for bone deformation using the same skeleton (Multiple versions o character created in blender as separate .glbs let me pick up the desired mesh and merge it in to the instantiated version of the "master" scene for that character) i could see how this specific workflow could be realized in 4.0 using something like Animation Retargeting. But i still think there are many other usecases where "picking up nodes" from file is really useful.

@Zireael07
Copy link
Contributor

That's exactly what I did with copy and paste. Open the glb, copy and paste, voila! No need to "add to project node tree"

@PetBom
Copy link

PetBom commented Dec 15, 2022

Alright. I think I get it now! :) So to adapt the workflow to 4.0 you would go:

Right click tree.glb in File System and select "New Inherited Scene"...
image

Right click "Copy" the selected node in the Inherited scene node tree...
image

Then "Paste" into the project node tree...
image

And, voila! There we are!
image

And then just discard the unsaved scene tab.

Yeah that works. For users accustomed to "Merge from scene" (like me) it's not super obvious but once explained it makes sense. I think that it was "New Inherited Scene" that threw me, as instantiating a scene was what I was trying to avoid. Thanks for clarifying. I'll just leave this here if someone else stumbles along with same question ;)

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.

Merge from scene confusion (maybe bug)
6 participants