UsdAsset¶
- class grill.names.UsdAsset(*args, sep='-', **kwargs)[source]¶
Specialized
grill.names.CGAssetFile
name object for USD asset resources.Inheritance Diagram for UsdAsset
This is the currency for USD asset identifiers in the pipeline.
- Examples:
>>> asset_id = UsdAsset.get_default() >>> asset_id UsdAsset("demo-3d-abc-entity-rnd-main-atom-lead-base-whole.1.usda") >>> asset_id.suffix = 'usdc' >>> asset_id.version = 42 >>> asset_id UsdAsset("demo-3d-abc-entity-rnd-main-atom-lead-base-whole.42.usdc") >>> asset_id.suffix = 'abc' Traceback (most recent call last): ... ValueError: Can't set invalid name 'demo-3d-abc-entity-rnd-main-atom-lead-base-whole.42.abc' on UsdAsset("demo-3d-abc-entity-rnd-main-atom-lead-base-whole.42.usdc"). Valid convention is: '{code}-{media}-{kingdom}-{cluster}-{area}-{stream}-{item}-{step}-{variant}-{part}.{pipe}.{suffix}' with pattern: '^(?P<code>...(?P<suffix>sdf|usd|usda|usdc|usdz))$'
See also
grill.names.CGAsset
for a description of available fields,naming.Name
for an overview of the core API.- classmethod get_anonymous(**values)[source]¶
Get an anonymous
UsdAsset
name with optional field overrides.Useful for situations where a temporary but valid identifier is needed.
- Parameters:
values – Variable keyword arguments with the keys referring to the name’s fields which will use the given values.
- Return type:
- Example:
>>> UsdAsset.get_anonymous(stream='test') UsdAsset("4209091047-34604-19646-169-123-test-4209091047-34604-19646-169.1.usda")
- config = mappingproxy({'code': '\\w+', 'media': '\\w+', 'kingdom': '\\w+', 'cluster': '\\w+', 'area': '\\w+', 'stream': '\\w+', 'item': '\\w+', 'step': '\\w+', 'variant': '\\w+', 'part': '\\w+'})¶
- join = mappingproxy({})¶