From 5f73572b6bfa875d467b378aed06f74bdebf8705 Mon Sep 17 00:00:00 2001 From: ppt-adsk Date: Tue, 15 Oct 2024 13:24:13 -0400 Subject: [PATCH] Add support for display of VtArray (#187) --- lib/adskHydraSceneBrowser/lib/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/adskHydraSceneBrowser/lib/CMakeLists.txt b/lib/adskHydraSceneBrowser/lib/CMakeLists.txt index 8c968ba1b..5ac4161bf 100644 --- a/lib/adskHydraSceneBrowser/lib/CMakeLists.txt +++ b/lib/adskHydraSceneBrowser/lib/CMakeLists.txt @@ -92,6 +92,13 @@ foreach(SOURCE IN ITEMS ${SOURCES}) set(SET_EXPANDED_REPLACEMENT "setExpanded\(true\);") string(REGEX REPLACE "${SET_EXPANDED_REGEX}" "${SET_EXPANDED_REPLACEMENT}" FILE_CONTENTS "${FILE_CONTENTS}") + # Patch in support for VtArray. Arbitrarily place it after support + # for VtArray. For simplicity we run this on each file, even + # though it is relevant only for dataSourceValueTreeView.cpp + set(VTARRAY_TARGET_REGEX "return new Hdui_TypedArrayValueItemModel\\(value, parent\\);[\r\n\t ]+}") + set(VTARRAY_TARGET_REPLACEMENT "return new Hdui_TypedArrayValueItemModel(value, parent);\n }\n\n if (value.IsHolding>()) {\n return new Hdui_TypedArrayValueItemModel(value, parent);\n }") + string(REGEX REPLACE "${VTARRAY_TARGET_REGEX}" "${VTARRAY_TARGET_REPLACEMENT}" FILE_CONTENTS "${FILE_CONTENTS}") + # Patch in '#include ' to make sure we can use QLatin1StringView prepend_include(FILE_CONTENTS "#include ")