Skip to content

Commit

Permalink
b/139670642: Don't filter out empty nodes named "empty_"
Browse files Browse the repository at this point in the history
We use these for non-exportable things.

Change-Id: Id000b01514d953a991eee0ba70f12e0c7127b1f1
  • Loading branch information
dubois committed Oct 22, 2019
1 parent 87c8f6d commit 6ee00cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion UnitySDK/Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,13 @@ static IEnumerable CreateGameObjectsFromNode(
ImportState state, Transform parent, GltfNodeBase node, GltfImportResult result,
GltfMaterialConverter matConverter, Vector3 translationToApply) {
if (node.Mesh == null && !node.Children.Any()) {
yield break;
if (node.name != null && node.name.StartsWith("empty_")) {
// explicitly-empty nodes are used to mark things like non-exportable models
/* fall through */
} else {
// Other empty nodes can creep in, like the SceneLight_ nodes. Don't want those.
yield break;
}
}

GameObject obj = new GameObject(node.name);
Expand Down

0 comments on commit 6ee00cf

Please sign in to comment.