File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,9 +211,17 @@ UsdRiStatementsAPI::GetRiAttributes(
211211 continue ;
212212 }
213213 // If we encounter the same Ri attribute name encoded as both
214- // a new and old style attribute, return only the new-style one.
214+ // a new and old style attribute, return only the new-style one,
215+ // unless the old style attribute is authored and the new-style
216+ // one is not (e.g. it exists due to applied schema).
215217 bool foundAsPrimvar = false ;
218+ bool oldStylePropAuthored = prop.IsAuthored ();
216219 for (size_t i=0 ; i < numNewStylePrimvars; ++i) {
220+ if (oldStylePropAuthored && !validProps[i].IsAuthored ()) {
221+ // Old-style attribute wins if it is authored
222+ // but the new-style primvar is not.
223+ continue ;
224+ }
217225 const std::string &primvarName =
218226 validProps[i].GetName ().GetString ();
219227 std::size_t nsOffset = primvarName.find (" :" );
You can’t perform that action at this time.
0 commit comments