Update to tinyusdz "dev" branch commit f8f9bb8

pull/5522/head
Steve M 2024-04-06 17:24:24 -07:00
parent 0bba1aa5b5
commit caf3051c67
2 changed files with 13 additions and 2 deletions

View File

@ -1433,6 +1433,10 @@ class TypedAttribute {
void set_value_empty() { _value_empty = true; }
bool is_value_empty() const {
if (is_connection()) {
return false;
}
if (_value_empty) {
return true;
}

View File

@ -1736,7 +1736,10 @@ bool RenderSceneConverter::ConvertUVTexture(const Path &tex_abs_path,
PUSH_ERROR_AND_RETURN(fmt::format("Invalid or unsupported token value for 'colorSpace': `{}` ", cs_token.str()));
}
texImage.usdColorSpace = cs;
} else {
}
{
if (texture.sourceColorSpace.authored()) {
UsdUVTexture::SourceColorSpace cs;
if (texture.sourceColorSpace.get_value().get_scalar(&cs)) {
@ -2658,7 +2661,11 @@ bool from_token(const value::token &tok, ColorSpace *cty) {
return false;
}
if (tok.str() == "srgb") {
if (tok.str() == "raw") {
(*cty) = ColorSpace::Linear;
} else if (tok.str() == "Raw") { // NOTE: Seems uncommon token
(*cty) = ColorSpace::Linear;
} else if (tok.str() == "srgb") {
(*cty) = ColorSpace::sRGB;
} else if (tok.str() == "linear") {
(*cty) = ColorSpace::Linear;