Skip to content

Commit 507668e

Browse files
committed
Fix Windows CMake typos as well as documentation typos
1 parent c285ac6 commit 507668e

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ set(AR_PYTHONRESOLVER_USD_PYTHON_EXPOSE_MODULE_NAME PythonExpose)
4141
set(AR_PYTHONRESOLVER_TARGET_LIB pythonResolver)
4242
set(AR_PYTHONRESOLVER_TARGET_PYTHON _${AR_PYTHONRESOLVER_TARGET_LIB})
4343
set(AR_PYTHONRESOLVER_INSTALL_PREFIX ${AR_PROJECT_NAME}/${AR_PYTHONRESOLVER_USD_PLUGIN_NAME})
44+
4445
# Cached Resolver
4546
option(AR_CACHEDRESOLVER_BUILD "Build the CachedResolver" OFF)
4647
if("$ENV{AR_RESOLVER_NAME}" STREQUAL "cachedResolver")
@@ -146,7 +147,7 @@ if("$ENV{AR_DCC_NAME}" STREQUAL "HOUDINI")
146147
set(AR_BOOST_NAMESPACE pxr_boost)
147148
set(AR_BOOST_FOLDER_NAMESPACE boost)
148149
if (WIN32)
149-
set(AR_BOOST_PYTHON_LIB ${AR_BOOST_NAMESPACE}_${AR_PYTHON_LIB_NUMBER}-mt-x64)
150+
set(AR_BOOST_PYTHON_LIB lib${AR_BOOST_NAMESPACE})
150151
else()
151152
set(AR_BOOST_PYTHON_LIB ${AR_BOOST_NAMESPACE})
152153
endif()

docs/src/resolvers/CachedResolver/example.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ You'll also need to adjust the `shotA_mapping.usd` to point to absolute file pat
4343
Let's have a look how we can demo this setup in Houdini.
4444

4545
### Loading our Shot
46-
If everything was initialized correctly, we can sublayer in the shot A USD file by referring to it via `shots/shotsA`.
46+
If everything was initialized correctly, we can sublayer in the shot A USD file by referring to it via `shots/shotA`
4747

4848
![Houdini Shot](./media/ProductionExampleHoudiniShot.png)
4949

@@ -137,7 +137,7 @@ class Resolver:
137137
# For this example, we assume all identifier are anchored to the shot and asset directories.
138138
# We remove the version from the identifier, so that our mapping files can target a version-less identifier.
139139
anchor_path = anchorAssetPath.GetPathString()
140-
anchor_path = anchor_path[:-1] if anchor_path[-1] == "/" else anchor_path[:anchor_path.rfind("/")]
140+
anchor_path = anchor_path[:-1] if anchor_path[-1] == os.path.sep else anchor_path[:anchor_path.rfind(os.path.sep)]
141141
entity_type = os.path.basename(os.path.dirname(anchor_path))
142142
entity_identifier = os.path.basename(anchor_path)
143143
entity_element = os.path.basename(assetPath).split("_")[0]
@@ -188,7 +188,7 @@ class ResolverContext:
188188
base_identifier = assetPath[len(RELATIVE_PATH_IDENTIFIER_PREFIX):]
189189
anchor_path, entity_element = base_identifier.split("?")
190190
entity_type, entity_identifier = anchor_path.split("/")
191-
entity_element, entity_version = entity_element.split("-")
191+
entity_element, entity_version = entity_element.split("_")
192192
# Here you would add your custom relative path resolve logic.
193193
# We can test our mapping pairs to see if the version is pinned, otherwise we fallback to the original intent.
194194
versionless_identifier = f"{RELATIVE_PATH_IDENTIFIER_PREFIX}{entity_type}/{entity_identifier}?{entity_element}"

files/implementations/CachedResolver/code/PythonExpose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def CreateRelativePathIdentifier(resolver, anchoredAssetPath, assetPath, anchorA
6565
# For this example, we assume all identifier are anchored to the shot and asset directories.
6666
# We remove the version from the identifier, so that our mapping files can target a version-less identifier.
6767
anchor_path = anchorAssetPath.GetPathString()
68-
anchor_path = anchor_path[:-1] if anchor_path[-1] == "/" else anchor_path[:anchor_path.rfind("/")]
68+
anchor_path = anchor_path[:-1] if anchor_path[-1] == os.path.sep else anchor_path[:anchor_path.rfind(os.path.sep)]
6969
entity_type = os.path.basename(os.path.dirname(anchor_path))
7070
entity_identifier = os.path.basename(anchor_path)
7171
entity_element = os.path.basename(assetPath).split("_")[0]
@@ -122,7 +122,7 @@ def ResolveAndCache(context, assetPath):
122122
base_identifier = assetPath[len(RELATIVE_PATH_IDENTIFIER_PREFIX):]
123123
anchor_path, entity_element = base_identifier.split("?")
124124
entity_type, entity_identifier = anchor_path.split("/")
125-
entity_element, entity_version = entity_element.split("-")
125+
entity_element, entity_version = entity_element.split("_")
126126
# Here you would add your custom relative path resolve logic.
127127
# We can test our mapping pairs to see if the version is pinned, otherwise we fallback to the original intent.
128128
versionless_identifier = f"{RELATIVE_PATH_IDENTIFIER_PREFIX}{entity_type}/{entity_identifier}?{entity_element}"

src/CachedResolver/PythonExpose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def ResolveAndCache(context, assetPath):
133133
relative_path, anchor_path = assetPath[len(relative_path_prefix) :].split(
134134
"?"
135135
)
136-
anchor_path = anchor_path[:-1] if anchor_path[-1] == "/" else anchor_path[:anchor_path.rfind("/")]
136+
anchor_path = anchor_path[:-1] if anchor_path[-1] == os.path.sep else anchor_path[:anchor_path.rfind(os.path.sep)]
137137
resolved_asset_path = os.path.normpath(os.path.join(anchor_path, relative_path))
138138
context.AddCachingPair(assetPath, resolved_asset_path)
139139
return resolved_asset_path

0 commit comments

Comments
 (0)