Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/custom_resolver/project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
project(custom_resolver)
cmake_minimum_required(VERSION 3.1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # This line is optional. It's just for certain IDEs to use

# 2.Configuration
Expand Down
2 changes: 1 addition & 1 deletion plugins/custom_resolver/project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ This project is a C++ USD resolver plugin. It does nothing but resolve
## To Build
```bash
cd build
USD_INSTALL_ROOT=/usr/local/USD-19.07 cmake .. # or wherever you've installed USD
USD_INSTALL_ROOT=/usr/local/USD-24.11 cmake .. # or wherever you've installed USD
make install
```
2 changes: 1 addition & 1 deletion plugins/custom_resolver/project/cmake/FindUSD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ find_path(USD_INCLUDE_DIR pxr/pxr.h
PATHS ${USD_INSTALL_ROOT}/include
DOC "USD Include directory")

find_path(USD_LIBRARY_DIR libusd.so
find_path(USD_LIBRARY_DIR libusd_usd.so
PATHS ${USD_INSTALL_ROOT}/lib
DOC "USD Libraries directory")

Expand Down
2 changes: 1 addition & 1 deletion plugins/custom_resolver/project/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ target_link_libraries(${PLUGIN_NAME}
PUBLIC

libboost_python.so
libar.so
libusd_ar.so
)

target_include_directories(
Expand Down
9 changes: 3 additions & 6 deletions plugins/custom_resolver/project/src/resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ URIResolver::URIResolver() : ArDefaultResolver() {}

URIResolver::~URIResolver() = default;

bool URIResolver::IsRelativePath(const std::string& path) {
return false;
}

std::string URIResolver::Resolve(const std::string& path) {
ArResolvedPath URIResolver::_Resolve(const std::string& path) {
if (path == "/foo") {
return "/bar";
return ArResolvedPath("/bar");
}

return "";
return {};
}

PXR_NAMESPACE_CLOSE_SCOPE
4 changes: 1 addition & 3 deletions plugins/custom_resolver/project/src/resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class URIResolver : public ArDefaultResolver {
URIResolver();
~URIResolver();

bool IsRelativePath(const std::string& path) override;

std::string Resolve(const std::string& path) override;
ArResolvedPath _Resolve(const std::string& path);

// std::string ResolveWithAssetInfo(
// const std::string& path, ArAssetInfo* assetInfo) override;
Expand Down