From da26b14ace4518339059f32d43eb3374a948e2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=95=89=E5=A4=AA=E7=8B=BC?= <1251212394@qq.com> Date: Fri, 8 Aug 2025 10:56:42 +0800 Subject: [PATCH 1/2] Fix VS2022 complie for usd plugin Fix VS2022 complie for usd plugin --- src/experimental/usd/plugins/mjcf/mjcf_file_format.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/experimental/usd/plugins/mjcf/mjcf_file_format.cc b/src/experimental/usd/plugins/mjcf/mjcf_file_format.cc index e38b2c7441..0c48e397fe 100644 --- a/src/experimental/usd/plugins/mjcf/mjcf_file_format.cc +++ b/src/experimental/usd/plugins/mjcf/mjcf_file_format.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#ifdef _WIN32 +#define strcasecmp _stricmp +#define NOMINMAX +#endif + #include "mjcf/mjcf_file_format.h" #include From a63f7dd8484bb7ec7ff55abf0f06f4f3e2771019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=95=89=E5=A4=AA=E7=8B=BC?= <1251212394@qq.com> Date: Fri, 8 Aug 2025 10:58:03 +0800 Subject: [PATCH 2/2] Fix VS2022 complie for usd plugin Fix VS2022 complie for usd plugin --- src/experimental/usd/plugins/mjcf/mujoco_to_usd.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/experimental/usd/plugins/mjcf/mujoco_to_usd.cc b/src/experimental/usd/plugins/mjcf/mujoco_to_usd.cc index 26ec24142c..8c09ccdc19 100644 --- a/src/experimental/usd/plugins/mjcf/mujoco_to_usd.cc +++ b/src/experimental/usd/plugins/mjcf/mujoco_to_usd.cc @@ -128,10 +128,12 @@ using Arch_ConstructorEntry = pxr::Arch_ConstructorEntry; #endif enum ErrorCodes { UnsupportedActuatorTypeError, UnsupportedGeomTypeError, MujocoCompilationError }; +#ifndef _WIN32 TF_REGISTRY_FUNCTION(pxr::TfEnum) { TF_ADD_ENUM_NAME(UnsupportedGeomTypeError, "UsdGeom type is unsupported.") TF_ADD_ENUM_NAME(MujocoCompilationError, "Mujoco spec failed to compile.") } +#endif // _WIN32 // Usings to satisfy TF_ERROR macro. using pxr::TfCallContext;