AYON Usd Resolver  0.1.0
Loading...
Searching...
No Matches
resolver.h
Go to the documentation of this file.
1#ifndef AR_AYONUSDRESOLVER_RESOLVER_H
2#define AR_AYONUSDRESOLVER_RESOLVER_H
3
4#include "pluginData/api.h"
5
6#include "pxr/pxr.h"
7#include "pxr/usd/ar/resolvedPath.h"
8#include "pxr/usd/ar/resolver.h"
9#include "resolverContext.h"
11
12#include <memory>
13#include <string>
14
15PXR_NAMESPACE_OPEN_SCOPE
16
17class AyonUsdResolver final: public ArResolver {
18 public:
22 virtual ~AyonUsdResolver();
24 std::string _CreateIdentifier(const std::string &assetPath, const ArResolvedPath &anchorAssetPath) const final;
26 std::string _CreateIdentifierForNewAsset(const std::string &assetPath,
27 const ArResolvedPath &anchorAssetPath) const final;
29 ArResolvedPath _Resolve(const std::string &assetPath) const final;
31 ArResolvedPath _ResolveForNewAsset(const std::string &assetPath) const final;
33 ArResolverContext _CreateDefaultContext() const final;
35 ArResolverContext _CreateDefaultContextForAsset(const std::string &assetPath) const final;
37 bool _IsContextDependentPath(const std::string &assetPath) const final;
39 void _RefreshContext(const ArResolverContext &context) final;
40
42 ArTimestamp _GetModificationTimestamp(const std::string &assetPath,
43 const ArResolvedPath &resolvedPath) const final;
45 std::shared_ptr<ArAsset> _OpenAsset(const ArResolvedPath &resolvedPath) const final;
47 std::shared_ptr<ArWritableAsset> _OpenAssetForWrite(const ArResolvedPath &resolvedPath,
48 WriteMode writeMode) const final;
49
50 AR_AYONUSDRESOLVER_API const AyonUsdResolverContext* GetConnectedContext() const;
51
52 private:
53 const AyonUsdResolverContext* _GetCurrentContextPtr() const;
54 AyonUsdResolverContext _fallbackContext;
55 const std::string emptyString{""};
56};
57
58PXR_NAMESPACE_CLOSE_SCOPE
59
60#endif // AR_AYONUSDRESOLVER_RESOLVER_H
#define AR_AYONUSDRESOLVER_API
Definition: api.h:17
Definition: resolverContext.h:13
AR_AYONUSDRESOLVER_API std::string _CreateIdentifierForNewAsset(const std::string &assetPath, const ArResolvedPath &anchorAssetPath) const final
Definition: resolver.cpp:65
AR_AYONUSDRESOLVER_API AyonUsdResolver()
AR_AYONUSDRESOLVER_API std::string _CreateIdentifier(const std::string &assetPath, const ArResolvedPath &anchorAssetPath) const final
Definition: resolver.cpp:39
AR_AYONUSDRESOLVER_API ArResolvedPath _Resolve(const std::string &assetPath) const final
Definition: resolver.cpp:87
AR_AYONUSDRESOLVER_API ArResolverContext _CreateDefaultContext() const final
Definition: resolver.cpp:156
AR_AYONUSDRESOLVER_API ArResolvedPath _ResolveForNewAsset(const std::string &assetPath) const final
Definition: resolver.cpp:149
Definition: __init__.py:1