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

Add support for validating USDZ files referencing textures with .jpeg… #1919

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pxr/usd/usdUtils/complianceChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def CheckStage(self, usdStage):

class TextureChecker(BaseRuleChecker):
# The most basic formats are those published in the USDZ spec
_basicUSDZImageFormats = ("jpg", "png")
_basicUSDZImageFormats = ("jpg", "jpeg", "png")

# In non-consumer-content (arkit) mode, OIIO can allow us to
# additionaly read other formats from USDZ packages
Expand All @@ -259,7 +259,7 @@ class TextureChecker(BaseRuleChecker):
@staticmethod
def GetDescription():
return """Texture files should be readable by intended client
(only .jpg or .png for consumer-level USDZ)."""
(only .jpg, .jpeg or .png for consumer-level USDZ)."""

def __init__(self, verbose, consumerLevelChecks, assetLevelChecks):
# Check if the prim has an allowed type.
Expand Down Expand Up @@ -466,7 +466,7 @@ def _TextureIs8Bit(self, asset):
from pxr import Ar
ext = Ar.GetResolver().GetExtension(asset.resolvedPath)
# not an exhaustive list, but ones we typically can read
return ext in ["bmp", "tga", "jpg", "png", "tif"]
return ext in ["bmp", "tga", "jpg", "jpeg", "png", "tif"]

def _GetInputValue(self, shader, inputName):
from pxr import Usd
Expand Down