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

Fix asset container instantiation with parented instanced nodes #13467

Merged
merged 9 commits into from
Jan 31, 2023

Conversation

carolhmj
Copy link
Contributor

Fix #13454

I don't think there's any way around using some kind of dependency graph to instantiate nodes in the correct order but if anyone has a simpler idea I'd love to hear it :D

@carolhmj carolhmj added the bug label Jan 25, 2023
@carolhmj carolhmj requested review from RaananW and Popov72 January 25, 2023 19:56
@carolhmj carolhmj marked this pull request as draft January 25, 2023 19:56
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 25, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Copy link
Contributor

@Popov72 Popov72 left a comment

Choose a reason for hiding this comment

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

Only a few comments, great work!

@Popov72 Popov72 added assets and removed assets labels Jan 26, 2023
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 26, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Copy link
Contributor

@Popov72 Popov72 left a comment

Choose a reason for hiding this comment

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

Shouldn't we use the same default naming than before when cloning / instantiating new nodes? i.e., adding "Clone of " or "instance of" as instantiateHierarchy is doing, to avoid a breaking change?

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 27, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@carolhmj carolhmj marked this pull request as ready for review January 30, 2023 15:06
@carolhmj carolhmj requested a review from Popov72 January 30, 2023 15:07
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2023

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2023

Visualization tests for webgl1 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13467/merge/testResults/webgl1/index.html

If tests were successful afterwards, this report might not be available anymore.

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

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

Great! Just a few comments

@sebavan sebavan merged commit 8e35da0 into BabylonJS:master Jan 31, 2023
@aWeirdo
Copy link
Contributor

aWeirdo commented Feb 2, 2023

I think this broke something when using AssetContainer.instantiateModelsToScene()
Started getting spammed with logger messages "Instances should only be created for meshes with geometry."

All meshes and rootNodes(probably the logger cause) added by instantiateModelsToScene now tagged as "isAnInstance" when running the following code in console

scene.meshes.forEach( (mesh) => {
    console.error(mesh.name, mesh.isAnInstance)
})

and animations can no longer be played separately,

check console (might need to hard reload), should show the logger message spam, the heads are also supposed to move/animate independently of each other (delayed), check the 4.2.1 bjs version as reference
https://playground.babylonjs.com/#S7E00P

@carolhmj carolhmj deleted the fixAssetContainerInstantiation branch July 19, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

instantiateModelsToScene doesn't take parents of clones nodes into account
7 participants