diff --git a/source/blender/render/hydra/scene_delegate/light.cc b/source/blender/render/hydra/scene_delegate/light.cc index b9952f2ddad2..7c1ae2f7dd30 100644 --- a/source/blender/render/hydra/scene_delegate/light.cc +++ b/source/blender/render/hydra/scene_delegate/light.cc @@ -139,7 +139,6 @@ void LightData::update() pxr::VtValue LightData::get_data(pxr::TfToken const &key) const { ID_LOG(3, "%s", key.GetText()); - pxr::VtValue ret; auto it = data_.find(key); if (it != data_.end()) { return pxr::VtValue(it->second); diff --git a/source/blender/render/hydra/scene_delegate/mesh.cc b/source/blender/render/hydra/scene_delegate/mesh.cc index 2cd9b7046268..f2bf1235b2de 100644 --- a/source/blender/render/hydra/scene_delegate/mesh.cc +++ b/source/blender/render/hydra/scene_delegate/mesh.cc @@ -2,6 +2,7 @@ * Copyright 2011-2022 Blender Foundation */ #include +#include #include #include "BKE_material.h" @@ -12,6 +13,10 @@ #include "blender_scene_delegate.h" #include "mesh.h" +PXR_NAMESPACE_OPEN_SCOPE +TF_DEFINE_PRIVATE_TOKENS(_tokens, (st)); +PXR_NAMESPACE_CLOSE_SCOPE + namespace blender::render::hydra { MeshData::MeshData(BlenderSceneDelegate *scene_delegate, @@ -85,7 +90,7 @@ pxr::VtValue MeshData::get_data(pxr::SdfPath const &id, pxr::TfToken const &key) else if (key == pxr::HdTokens->normals) { return pxr::VtValue(submesh(id).normals); } - else if (key == pxr::HdPrimvarRoleTokens->textureCoordinate) { + else if (key == pxr::_tokens->st) { return pxr::VtValue(submesh(id).uvs); } return pxr::VtValue(); @@ -128,9 +133,8 @@ pxr::HdPrimvarDescriptorVector MeshData::primvar_descriptors( pxr::HdTokens->normals, interpolation, pxr::HdPrimvarRoleTokens->normal); } if (!submeshes_[0].uvs.empty()) { - primvars.emplace_back(pxr::HdPrimvarRoleTokens->textureCoordinate, - interpolation, - pxr::HdPrimvarRoleTokens->textureCoordinate); + primvars.emplace_back( + pxr::_tokens->st, interpolation, pxr::HdPrimvarRoleTokens->textureCoordinate); } } return primvars;