Skip to content

Commit

Permalink
glb2: Don't warn about gltf2 + Tilt Brush
Browse files Browse the repository at this point in the history
It's now normal and expected to see Gltf2Materials in Tilt Brush files.
There's no way to get at shader properties, but that's fine -- with
gltf2, Tilt Brush can use PBR to export non-brush-related geometry
rather than use the old "template" BrushDescriptor trick.

Change-Id: Id000b0154581f86cf625d022ae75c90373decaff
  • Loading branch information
dubois committed Sep 17, 2019
1 parent e555daa commit 4ed9940
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ private static Guid ParseGuidFromShader(Gltf1Material material) {
/// Returns a BrushDescriptor given a gltf material, or null if not found.
/// If the material is an instance of a template, the descriptor for that
/// will be returned.
/// Note that gltf2 has pbr support, and Tilt Brush uses that instead of
/// template "brushes".
public static BrushDescriptor LookupBrushDescriptor(GltfMaterialBase gltfMaterial) {
Guid guid = ParseGuidFromMaterial(gltfMaterial);
if (guid == Guid.Empty) {
Expand All @@ -439,7 +441,6 @@ public static BrushDescriptor LookupBrushDescriptor(GltfMaterialBase gltfMateria
// can be found on the shader.
Gltf1Material gltf1Material = gltfMaterial as Gltf1Material;
if (gltf1Material == null) {
Debug.LogErrorFormat("Unexpected: glTF2 Tilt Brush material");
return null;
}
Guid templateGuid = ParseGuidFromShader((Gltf1Material)gltfMaterial);
Expand Down

0 comments on commit 4ed9940

Please sign in to comment.