Skip to content

Commit

Permalink
Token updates in preparation for Schema Versioning
Browse files Browse the repository at this point in the history
Latest UsdGenSchema generates tokens for each schema's identifier and
family in the library's token class. Updating MayaUsd schema tokens to
comply with this change
  • Loading branch information
dj-mcg committed Jan 18, 2023
1 parent e5fe15e commit c2edbf6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/usd/schemas/tokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ MayaUsd_SchemasTokensType::MayaUsd_SchemasTokensType()
: mayaAutoEdit("mayaAutoEdit", TfToken::Immortal)
, mayaNamespace("mayaNamespace", TfToken::Immortal)
, mayaReference("mayaReference", TfToken::Immortal)
, allTokens({ mayaAutoEdit, mayaNamespace, mayaReference })
, ALMayaReference("ALMayaReference", TfToken::Immortal)
, MayaReference("MayaReference", TfToken::Immortal)
, allTokens({ mayaAutoEdit, mayaNamespace, mayaReference, ALMayaReference, MayaReference })
{
}

Expand Down
8 changes: 8 additions & 0 deletions lib/usd/schemas/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ struct MayaUsd_SchemasTokensType
///
/// MayaUsd_SchemasMayaReference
const TfToken mayaReference;
/// \brief "ALMayaReference"
///
/// Schema identifer and family for MayaUsd_SchemasALMayaReference
const TfToken ALMayaReference;
/// \brief "MayaReference"
///
/// Schema identifer and family for MayaUsd_SchemasMayaReference
const TfToken MayaReference;
/// A vector of all of the tokens listed above.
const std::vector<TfToken> allTokens;
};
Expand Down
2 changes: 2 additions & 0 deletions lib/usd/schemas/wrapTokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ void wrapMayaUsd_SchemasTokens()
_AddToken(cls, "mayaAutoEdit", MayaUsd_SchemasTokens->mayaAutoEdit);
_AddToken(cls, "mayaNamespace", MayaUsd_SchemasTokens->mayaNamespace);
_AddToken(cls, "mayaReference", MayaUsd_SchemasTokens->mayaReference);
_AddToken(cls, "ALMayaReference", MayaUsd_SchemasTokens->ALMayaReference);
_AddToken(cls, "MayaReference", MayaUsd_SchemasTokens->MayaReference);
}

0 comments on commit c2edbf6

Please sign in to comment.