@@ -144,7 +144,8 @@ namespace sdf
144
144
assetPath (pxr::TfToken (" diffuse_texture" ), variantShader);
145
145
pbrWorkflow.SetAlbedoMap (materialPath.GetAssetPath ());
146
146
std::string fullAlbedoName =
147
- ignition::common::findFile (materialPath.GetAssetPath ());
147
+ ignition::common::findFile (ignition::common::basename (
148
+ materialPath.GetAssetPath ()));
148
149
UsdErrors errorCopy = copyFile (
149
150
fullAlbedoName, materialPath.GetAssetPath ());
150
151
if (!errorCopy.empty ())
@@ -160,7 +161,8 @@ namespace sdf
160
161
assetPath (pxr::TfToken (" normalmap_texture" ), variantShader);
161
162
pbrWorkflow.SetNormalMap (materialPath.GetAssetPath ());
162
163
std::string fullNormalName =
163
- ignition::common::findFile (materialPath.GetAssetPath ());
164
+ ignition::common::findFile (ignition::common::basename (
165
+ materialPath.GetAssetPath ()));
164
166
auto errorCopy = copyFile (fullNormalName,
165
167
materialPath.GetAssetPath ());
166
168
if (!errorCopy.empty ())
@@ -176,7 +178,8 @@ namespace sdf
176
178
pxr::TfToken (" reflectionroughness_texture" ), variantShader);
177
179
pbrWorkflow.SetRoughnessMap (materialPath.GetAssetPath ());
178
180
std::string fullRoughnessName =
179
- ignition::common::findFile (materialPath.GetAssetPath ());
181
+ ignition::common::findFile (ignition::common::basename (
182
+ materialPath.GetAssetPath ()));
180
183
auto errorCopy = copyFile (
181
184
fullRoughnessName, materialPath.GetAssetPath ());
182
185
if (!errorCopy.empty ())
@@ -192,7 +195,8 @@ namespace sdf
192
195
pxr::TfToken (" metallic_texture" ), variantShader);
193
196
pbrWorkflow.SetMetalnessMap (materialPath.GetAssetPath ());
194
197
std::string fullMetalnessName =
195
- ignition::common::findFile (materialPath.GetAssetPath ());
198
+ ignition::common::findFile (ignition::common::basename (
199
+ materialPath.GetAssetPath ()));
196
200
auto errorCopy = copyFile (
197
201
fullMetalnessName, materialPath.GetAssetPath ());
198
202
if (!errorCopy.empty ())
0 commit comments