From dd21709518df46c2a3365220ceb83868f84438b9 Mon Sep 17 00:00:00 2001 From: chr11115 Date: Wed, 21 Sep 2022 13:15:51 +0200 Subject: [PATCH 01/29] Cleanup: rename compareGroups to compareGroupOrder --- src/serlio/modifiers/RuleAttributes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index 557b73df..6d14c522 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -223,7 +223,7 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& return a.groups[i]; }; - auto compareGroups = [&](const RuleAttribute& a, const RuleAttribute& b) { + auto compareGroupOrder = [&](const RuleAttribute& a, const RuleAttribute& b) { if (isChildOf(a, b)) return false; // child a should be sorted after parent b @@ -254,7 +254,7 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& return compareRuleFile(a, b); if (a.groups != b.groups) - return compareGroups(a, b); + return compareGroupOrder(a, b); return compareAttributeOrder(a, b); }; From 01ab468ab835dfd5ffcc2d09025f19d242211160 Mon Sep 17 00:00:00 2001 From: chr11115 Date: Wed, 21 Sep 2022 13:22:24 +0200 Subject: [PATCH 02/29] Add helper function to get baseName of attribute --- src/serlio/modifiers/RuleAttributes.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index 6d14c522..28beee92 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -49,8 +49,12 @@ std::wstring getBriefName(const std::wstring& fqAttrName, std::map Date: Wed, 21 Sep 2022 13:22:35 +0200 Subject: [PATCH 03/29] Compare attributes with and without groups --- src/serlio/modifiers/RuleAttributes.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index 28beee92..da5a5ac1 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -227,7 +227,25 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& return a.groups[i]; }; + auto compareOrderToGroupOrder = [&](const RuleAttribute& ruleAttrWithGroups, + const RuleAttribute& ruleAttrWithoutGroups) { + if ((ruleAttrWithGroups.groups.size() > 0) && + (ruleAttrWithGroups.globalGroupOrder == ruleAttrWithoutGroups.order)) + return ruleAttrWithGroups.groups[0] <= getAttrBaseName(ruleAttrWithoutGroups.fqName); + + return ruleAttrWithGroups.globalGroupOrder < ruleAttrWithoutGroups.order; + }; + auto compareGroupOrder = [&](const RuleAttribute& a, const RuleAttribute& b) { + const bool hasGroupsA = !a.groups.empty(); + const bool hasGroupsB = !b.groups.empty(); + + if (!hasGroupsB) + return compareOrderToGroupOrder(a, b); + + if (!hasGroupsA) + return !compareOrderToGroupOrder(b, a); + if (isChildOf(a, b)) return false; // child a should be sorted after parent b From 0418e64096ed7b909cf19c1bb69475884de44caa Mon Sep 17 00:00:00 2001 From: chr11115 Date: Wed, 21 Sep 2022 13:25:10 +0200 Subject: [PATCH 04/29] Take capitalization into account when sorting attributes --- src/serlio/modifiers/RuleAttributes.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index da5a5ac1..09ad5aeb 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -182,12 +182,6 @@ RuleAttributeSet getRuleAttributes(const std::wstring& ruleFile, const prt::Rule } bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& rhs) const { - auto lowerCaseOrdering = [](std::wstring a, std::wstring b) { - std::transform(a.begin(), a.end(), a.begin(), ::tolower); - std::transform(b.begin(), b.end(), b.begin(), ::tolower); - return a < b; - }; - auto compareRuleFile = [&](const RuleAttribute& a, const RuleAttribute& b) { // sort main rule attributes before the rest if (a.memberOfStartRuleFile && !b.memberOfStartRuleFile) @@ -198,7 +192,7 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& if (a.ruleOrder != b.ruleOrder) return a.ruleOrder < b.ruleOrder; - return lowerCaseOrdering(a.ruleFile, b.ruleFile); + return a.ruleFile < b.ruleFile; }; auto isChildOf = [](const RuleAttribute& child, const RuleAttribute& parent) { @@ -261,12 +255,12 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& if (a.groups.size() != b.groups.size()) return (a.groups.size() < b.groups.size()); - return lowerCaseOrdering(firstDifferentGroupInA(a, b), firstDifferentGroupInA(b, a)); + return firstDifferentGroupInA(a, b) < firstDifferentGroupInA(b, a); }; auto compareAttributeOrder = [&](const RuleAttribute& a, const RuleAttribute& b) { if (a.order == b.order) - return lowerCaseOrdering(a.fqName, b.fqName); + return a.fqName < b.fqName; return a.order < b.order; }; From a42e7a93a558f71e50348caa5044bb2e75ef147a Mon Sep 17 00:00:00 2001 From: chr11115 Date: Wed, 21 Sep 2022 13:26:24 +0200 Subject: [PATCH 05/29] Add helper function to compare hierarchy of groups This fixes an issue where unrelated groups were not sorted correctly. I.e AGroup NestedGroup attr1 BGroup attr2 Is not correctly sorted alphabetically --- src/serlio/modifiers/RuleAttributes.cpp | 29 +++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index 09ad5aeb..0a64efb1 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -212,13 +212,24 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& return true; }; - auto firstDifferentGroupInA = [](const RuleAttribute& a, const RuleAttribute& b) { - assert(a.groups.size() == b.groups.size()); - size_t i = 0; - while ((i < a.groups.size()) && (a.groups[i] == b.groups[i])) { - i++; + auto compareGroups = [](const RuleAttribute& a, const RuleAttribute& b) { + const size_t GroupSizeA = a.groups.size(); + const size_t GroupSizeB = b.groups.size(); + + for (size_t i = 0; i < std::max(GroupSizeA, GroupSizeB); ++i) { + // a descendant of b + if (i >= GroupSizeA) + return false; + + // b descendant of a + if (i >= GroupSizeB) + return true; + + // difference in groups + if (a.groups[i] != b.groups[i]) + return a.groups[i] < b.groups[i]; } - return a.groups[i]; + return false; }; auto compareOrderToGroupOrder = [&](const RuleAttribute& ruleAttrWithGroups, @@ -251,11 +262,7 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& if (globalOrderA != globalOrderB) return (globalOrderA < globalOrderB); - // sort higher level before lower level - if (a.groups.size() != b.groups.size()) - return (a.groups.size() < b.groups.size()); - - return firstDifferentGroupInA(a, b) < firstDifferentGroupInA(b, a); + return compareGroups(a, b); }; auto compareAttributeOrder = [&](const RuleAttribute& a, const RuleAttribute& b) { From 29a3cb094df53a299fb79b731eddceae5f2c5709 Mon Sep 17 00:00:00 2001 From: chr11115 Date: Wed, 21 Sep 2022 13:28:27 +0200 Subject: [PATCH 06/29] Compare base attribute name without style and imports for sorting --- src/serlio/modifiers/RuleAttributes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index 0a64efb1..3d710e7b 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -267,7 +267,7 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& auto compareAttributeOrder = [&](const RuleAttribute& a, const RuleAttribute& b) { if (a.order == b.order) - return a.fqName < b.fqName; + return getAttrBaseName(a.fqName) < getAttrBaseName(b.fqName); return a.order < b.order; }; From 3fa1f644bbcc3053185fe57dee4c2aaedcbd1c09 Mon Sep 17 00:00:00 2001 From: chr11115 Date: Wed, 21 Sep 2022 16:19:59 +0200 Subject: [PATCH 07/29] Cleanup: remove redundant reference capturing --- src/serlio/modifiers/RuleAttributes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index 3d710e7b..e8d5d174 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -182,7 +182,7 @@ RuleAttributeSet getRuleAttributes(const std::wstring& ruleFile, const prt::Rule } bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& rhs) const { - auto compareRuleFile = [&](const RuleAttribute& a, const RuleAttribute& b) { + auto compareRuleFile = [](const RuleAttribute& a, const RuleAttribute& b) { // sort main rule attributes before the rest if (a.memberOfStartRuleFile && !b.memberOfStartRuleFile) return true; @@ -232,7 +232,7 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& return false; }; - auto compareOrderToGroupOrder = [&](const RuleAttribute& ruleAttrWithGroups, + auto compareOrderToGroupOrder = [](const RuleAttribute& ruleAttrWithGroups, const RuleAttribute& ruleAttrWithoutGroups) { if ((ruleAttrWithGroups.groups.size() > 0) && (ruleAttrWithGroups.globalGroupOrder == ruleAttrWithoutGroups.order)) @@ -265,7 +265,7 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& return compareGroups(a, b); }; - auto compareAttributeOrder = [&](const RuleAttribute& a, const RuleAttribute& b) { + auto compareAttributeOrder = [](const RuleAttribute& a, const RuleAttribute& b) { if (a.order == b.order) return getAttrBaseName(a.fqName) < getAttrBaseName(b.fqName); From 9aa0fa37c07a71249421cd0fd0171516f55abe5d Mon Sep 17 00:00:00 2001 From: chr11115 Date: Tue, 27 Sep 2022 09:20:18 +0200 Subject: [PATCH 08/29] Cleanup: inline empty group check --- src/serlio/modifiers/RuleAttributes.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index e8d5d174..ea3769a0 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -242,13 +242,10 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& }; auto compareGroupOrder = [&](const RuleAttribute& a, const RuleAttribute& b) { - const bool hasGroupsA = !a.groups.empty(); - const bool hasGroupsB = !b.groups.empty(); - - if (!hasGroupsB) + if (b.groups.empty()) return compareOrderToGroupOrder(a, b); - if (!hasGroupsA) + if (a.groups.empty()) return !compareOrderToGroupOrder(b, a); if (isChildOf(a, b)) From 7334af3fc3933d872dd183517a807b9ab1a9279d Mon Sep 17 00:00:00 2001 From: chr11115 Date: Tue, 27 Sep 2022 10:30:08 +0200 Subject: [PATCH 09/29] Cleanup: give proper name to loop variable --- src/serlio/modifiers/RuleAttributes.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/serlio/modifiers/RuleAttributes.cpp b/src/serlio/modifiers/RuleAttributes.cpp index ea3769a0..d2975cd6 100644 --- a/src/serlio/modifiers/RuleAttributes.cpp +++ b/src/serlio/modifiers/RuleAttributes.cpp @@ -216,18 +216,18 @@ bool RuleAttributeCmp::operator()(const RuleAttribute& lhs, const RuleAttribute& const size_t GroupSizeA = a.groups.size(); const size_t GroupSizeB = b.groups.size(); - for (size_t i = 0; i < std::max(GroupSizeA, GroupSizeB); ++i) { + for (size_t groupIdx = 0; groupIdx < std::max(GroupSizeA, GroupSizeB); ++groupIdx) { // a descendant of b - if (i >= GroupSizeA) + if (groupIdx >= GroupSizeA) return false; // b descendant of a - if (i >= GroupSizeB) + if (groupIdx >= GroupSizeB) return true; // difference in groups - if (a.groups[i] != b.groups[i]) - return a.groups[i] < b.groups[i]; + if (a.groups[groupIdx] != b.groups[groupIdx]) + return a.groups[groupIdx] < b.groups[groupIdx]; } return false; }; From 14860bdba4f30d685166463b616c4ce20f383137 Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Tue, 10 Jan 2023 14:45:00 +0100 Subject: [PATCH 10/29] Raise development version to 2.2.0-dev.0 --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 82e08755..b26502c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,8 +11,9 @@ include(common.cmake) ### version set(SRL_VERSION_MAJOR 2) -set(SRL_VERSION_MINOR 1) +set(SRL_VERSION_MINOR 2) set(SRL_VERSION_PATCH 0) +set(SRL_VERSION_PRERELEASE "dev.0") if (NOT SRL_VERSION_BUILD) set(SRL_VERSION_BUILD DEV) From 0447d4ad213cef67a76e3fcddaac789f5b0479ef Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Tue, 10 Jan 2023 14:30:45 +0100 Subject: [PATCH 11/29] Update to PRT 2.7.8538 --- src/common.cmake | 2 +- src/serlio/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.cmake b/src/common.cmake index bb2b0752..32537bcb 100644 --- a/src/common.cmake +++ b/src/common.cmake @@ -45,7 +45,7 @@ if (NOT prt_DIR) set(PRT_TC "gcc93") endif () - set(PRT_VERSION "2.6.8300") + set(PRT_VERSION "2.7.8538") set(PRT_CLS "${PRT_OS}-${PRT_TC}-x86_64-rel-opt") set(PRT_URL "https://github.com/esri/cityengine-sdk/releases/download/${PRT_VERSION}/esri_ce_sdk-${PRT_VERSION}-${PRT_CLS}.zip") diff --git a/src/serlio/CMakeLists.txt b/src/serlio/CMakeLists.txt index cf1c0275..b836449f 100644 --- a/src/serlio/CMakeLists.txt +++ b/src/serlio/CMakeLists.txt @@ -146,7 +146,7 @@ install(FILES ${SRL_PRT_LIBRARIES} DESTINATION ${INSTALL_FOLDER_PREFIX}/plug-ins # PRT: whitelist required extension libraries set(SRL_PRT_EXT_LIBRARIES ${PRT_EXT_LIBRARIES}) -list(FILTER SRL_PRT_EXT_LIBRARIES INCLUDE REGEX "com\\.esri\\.prt\\.(codecs|adaptors|oda|usd)|tbb|usd_ms") +list(FILTER SRL_PRT_EXT_LIBRARIES INCLUDE REGEX "com\\.esri\\.prt\\.(codecs|adaptors|oda|usd)|prt_tbb|prt_usd_ms|libcrypto") install(FILES ${SRL_PRT_EXT_LIBRARIES} DESTINATION ${INSTALL_FOLDER_PREFIX}/plug-ins/ext) install(DIRECTORY "${PRT_EXTENSION_PATH}/usd" DESTINATION ${INSTALL_FOLDER_PREFIX}/plug-ins/ext) # USD resource files From 6e21ad91419697a8b0f4f7625bb1689dd0f83aca Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Tue, 10 Jan 2023 14:33:43 +0100 Subject: [PATCH 12/29] Fix deprecation warning (mesh merging in encode preparator) --- src/codec/encoder/MayaEncoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codec/encoder/MayaEncoder.cpp b/src/codec/encoder/MayaEncoder.cpp index c769ce29..7d42a4fe 100644 --- a/src/codec/encoder/MayaEncoder.cpp +++ b/src/codec/encoder/MayaEncoder.cpp @@ -75,7 +75,7 @@ constexpr const wchar_t* ENC_DESCRIPTION = L"Encodes geometry into the Maya form const prtx::EncodePreparator::PreparationFlags PREP_FLAGS = prtx::EncodePreparator::PreparationFlags() .instancing(false) - .mergeByMaterial(true) + .meshMerging(prtx::MeshMerging::ALL_OF_SAME_MATERIAL_AND_TYPE) .triangulate(false) .processHoles(prtx::HoleProcessor::TRIANGULATE_FACES_WITH_HOLES) .mergeVertices(true) From 2a0d36e2ddd73c4f2b731b2cc8d6c35bd9014b5e Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Mon, 16 Jan 2023 11:43:30 +0100 Subject: [PATCH 13/29] doc: update required CityEngine version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac7b5285..28f1aa7c 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Please refer to the [release notes](#release-notes) for the supported CityEngine #### Software Requirements - Windows 10 and 11 (64bit) -- CityEngine 2021.1 or older +- CityEngine 2022.1 or older - Autodesk Maya 2019, 2020 or 2022 #### Windows: Provided Installer From 7765c34161a558fea53ee55825a5d745ede8bb86 Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Mon, 16 Jan 2023 11:45:34 +0100 Subject: [PATCH 14/29] doc: started changelog section for 2.2.0 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 28f1aa7c..972008b1 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,12 @@ Currently we only support one material type per mesh (see [known limitations](#k ## Release Notes +### v2.2.0 (2023-01-XX) +Required Cityengine version: 2022.1 or older. + +#### Changed: +* Updated Procedural Runtime (PRT) to 2.7 (corresponds to CityEngine 2022.1). + ### v2.1.0 (2022-07-06) Required CityEngine version: 2022.0 or older. #### Added: From 247c93ac9381c861468f713ade6cffa73e8a930f Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Mon, 16 Jan 2023 13:53:39 +0100 Subject: [PATCH 15/29] installer: raise development version to 2.2.0-dev.0 --- deploy/build.xml | 4 ++-- src/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/build.xml b/deploy/build.xml index cf82e022..b2b995ca 100644 --- a/deploy/build.xml +++ b/deploy/build.xml @@ -16,10 +16,10 @@ - + - + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b26502c8..0e9d9f9f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,7 +8,7 @@ set(SRL_DESCRIPTION "Esri CityEngine Plugin for Autodesk Maya") include(common.cmake) -### version +### version (keep in sync with deploy/build.xml) set(SRL_VERSION_MAJOR 2) set(SRL_VERSION_MINOR 2) From 53cd7698eaf409b15555b534a0bcf45f28f6f704 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Tue, 28 Mar 2023 11:14:56 +0200 Subject: [PATCH 16/29] Add normal indices nullptr and range check --- src/codec/encoder/MayaEncoder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/codec/encoder/MayaEncoder.cpp b/src/codec/encoder/MayaEncoder.cpp index c769ce29..1df6e81c 100644 --- a/src/codec/encoder/MayaEncoder.cpp +++ b/src/codec/encoder/MayaEncoder.cpp @@ -554,9 +554,11 @@ class SerializedGeometry { mCounts.push_back(vtxCnt); const uint32_t* vtxIdx = mesh->getFaceVertexIndices(fi); const uint32_t* nrmIdx = mesh->getFaceVertexNormalIndices(fi); + const size_t nrmCnt = mesh->getFaceVertexNormalCount(fi); for (uint32_t vi = 0; vi < vtxCnt; vi++) { mVertexIndices.push_back(vertexIndexBase + vtxIdx[vi]); - mNormalIndices.push_back(normalIndexBase + nrmIdx[vi]); + if (nrmCnt > vi && nrmIdx != nullptr) + mNormalIndices.push_back(normalIndexBase + nrmIdx[vi]); } } From 53053b59e25eae7319e4818505eba28ed1220f4a Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Tue, 23 May 2023 12:07:54 +0200 Subject: [PATCH 17/29] Add maya 2023 and remove 2019 from cmake --- src/common.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common.cmake b/src/common.cmake index 32537bcb..07415665 100644 --- a/src/common.cmake +++ b/src/common.cmake @@ -79,23 +79,23 @@ if (NOT maya_DIR) else () set(AUTODESK_INSTALL_LOCATION "/usr/autodesk") set(MAYA_BASE_NAME maya) - endif () - if (EXISTS "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2022") + endif() + if(EXISTS "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2023") + set(maya_DIR "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2023") + elseif(EXISTS "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2022") set(maya_DIR "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2022") - elseif (EXISTS "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2020") + elseif(EXISTS "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2020") set(maya_DIR "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2020") - elseif (EXISTS "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2019") - set(maya_DIR "${AUTODESK_INSTALL_LOCATION}/${MAYA_BASE_NAME}2019") endif () endif () # temporary heuristic to detect maya version number -if (maya_DIR MATCHES "[Mm]aya2019") - set(maya_VERSION_MAJOR "2019") -elseif (maya_DIR MATCHES "[Mm]aya2020") +if (maya_DIR MATCHES "[Mm]aya2020") set(maya_VERSION_MAJOR "2020") elseif (maya_DIR MATCHES "[Mm]aya2022") set(maya_VERSION_MAJOR "2022") +elseif (maya_DIR MATCHES "[Mm]aya2023") + set(maya_VERSION_MAJOR "2023") endif () function(srl_add_dependency_maya TGT) From 9b8b79ce284b6dde51db5c430732150959964b81 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Tue, 23 May 2023 12:08:32 +0200 Subject: [PATCH 18/29] Add maya 2023 and remove 2019 from installer --- deploy/PackageContents.xml.in | 18 +++++++++--------- deploy/build.xml | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/deploy/PackageContents.xml.in b/deploy/PackageContents.xml.in index 0f99d84b..9abc544d 100644 --- a/deploy/PackageContents.xml.in +++ b/deploy/PackageContents.xml.in @@ -21,15 +21,6 @@ Email="" /> - - - - - - - - - @@ -47,4 +38,13 @@ + + + + + + + + + diff --git a/deploy/build.xml b/deploy/build.xml index b2b995ca..e3603aa3 100644 --- a/deploy/build.xml +++ b/deploy/build.xml @@ -40,9 +40,9 @@ - + @@ -88,13 +88,6 @@ - - - - - - - @@ -109,7 +102,14 @@ - + + + + + + + + From 900fb50ac310ff996f29a140374a549199291b02 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Tue, 23 May 2023 12:08:48 +0200 Subject: [PATCH 19/29] Update docs to use maya 2023 --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 972008b1..67ebd813 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Please refer to the [release notes](#release-notes) for the supported CityEngine #### Software Requirements - Windows 10 and 11 (64bit) - CityEngine 2022.1 or older -- Autodesk Maya 2019, 2020 or 2022 +- Autodesk Maya 2020, 2022 or 2023 #### Windows: Provided Installer 1. Download the MSI installer for the latest [release](https://github.com/Esri/serlio/releases/latest). @@ -95,7 +95,7 @@ Currently we only support one material type per mesh (see [known limitations](#k #### All Platforms * License for CityEngine (2019.0 or later), e.g. to author Rule Packages. * CMake 3.13 or later (http://www.cmake.org) -* Autodesk Maya 2019, 2020 or 2022 or the corresponding development kit +* Autodesk Maya 2020, 2022 or 2023 or the corresponding development kit #### Windows * Windows 7, 8.1 or 10 (64bit) @@ -143,7 +143,7 @@ Currently we only support one material type per mesh (see [known limitations](#k 3. Open a Command Shell in the `serlio\deploy` directory. 4. Run `ant` in the current directioy. Make sure to set at least one valid install path: ``` - ant -D"maya2022.dir"=../install + ant -D"maya2023.dir"=../install ``` 5. The installer will appear in `serlio\build\build_msi`. @@ -151,14 +151,14 @@ Currently we only support one material type per mesh (see [known limitations](#k 1. Open a terminal (e.g. bash). 1. Change into the example directory: `cd /esri-cityengine-sdk/examples/serlio` 1. Create a build directory and change into it: `mkdir build && cd build` -1. Run cmake (adjust the Maya path if necessary): `cmake -Dmaya_DIR=/usr/autodesk/maya2022 ../src` +1. Run cmake (adjust the Maya path if necessary): `cmake -Dmaya_DIR=/usr/autodesk/maya2023 ../src` 1. Compile: `make install` 1. The build result will appear in the `install` directory in parallel to the `build` directory. We will use this as the plugin directory below. ### Install local build #### Windows 1. Locate the `install` directory where you [built](build.md) the plugin, let's call it `PLUGINDIR`. -1. Locate the Maya.env file in your home, usually its in `\Documents\maya\2020`. +1. Locate the Maya.env file in your home, usually its in `\Documents\maya\2023`. 1. Edit Maya.env as follows: ``` :: replace with the actual path From f573910a9124c721d8aea62246a1a377b46b3bbc Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Tue, 23 May 2023 12:09:05 +0200 Subject: [PATCH 20/29] Update jenkinsfile to add maya 2023 and remove maya 2019 builds --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 690ad963..1a6e3d8a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,21 +35,21 @@ properties([ disableConcurrentBuilds() ]) @Field final List CHECKOUT_CONFIG = [ [ ba: psl.BA_CHECKOUT ] ] // TODO: abusing grp field to distinguish maya versions per task @Field final List CONFIGS = [ - [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC93, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2019', maya: PrtAppPipelineLibrary.Dependencies.MAYA2019 ], [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC93, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2020', maya: PrtAppPipelineLibrary.Dependencies.MAYA2020 ], [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC93, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2022', maya: PrtAppPipelineLibrary.Dependencies.MAYA2022 ], - [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2019', maya: PrtAppPipelineLibrary.Dependencies.MAYA2019 ], + [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC93, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2023', maya: PrtAppPipelineLibrary.Dependencies.MAYA2023 ], [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2020', maya: PrtAppPipelineLibrary.Dependencies.MAYA2020 ], [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2022', maya: PrtAppPipelineLibrary.Dependencies.MAYA2022 ], + [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, grp: 'maya2023', maya: PrtAppPipelineLibrary.Dependencies.MAYA2023 ], ] @Field final List TEST_CONFIGS = [ - [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC93, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, maya: PrtAppPipelineLibrary.Dependencies.MAYA2022 ], - [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, maya: PrtAppPipelineLibrary.Dependencies.MAYA2022 ], + [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC93, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, maya: PrtAppPipelineLibrary.Dependencies.MAYA2023 ], + [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64, maya: PrtAppPipelineLibrary.Dependencies.MAYA2023 ], ] @Field final List INSTALLER_CONFIG = [ [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64 ] ] -@Field final List INSTALLER_MAYA_VERS = [ 'maya2019', 'maya2020', 'maya2022' ] +@Field final List INSTALLER_MAYA_VERS = [ 'maya2020', 'maya2022', 'maya2023' ] // -- PIPELINE From fc78ff87e1cd60a845a6e831e992d076a3e65881 Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Mon, 12 Jun 2023 09:41:47 +0200 Subject: [PATCH 21/29] doc: add known limitation on Linux for Serlio vs Maya 2023 USD plugin --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 67ebd813..0be226a9 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,7 @@ Required CityEngine version: 2021.1 or older. ## Known Limitations +* Serlio 2.2 and Maya 2023 **on Linux**: Serlio does not work if the Maya 2023 USD plugin is active at the same time (USD library clash). * Serlio 2.0: In Maya 2019 on Windows, Serlio does not support reading USD assets from RPKs. * Modifying the input shape after a Serlio node is attached is not supported. * Scaling transformations on the initial shape mesh will scale the entire generated model. Make sure that all scaling transformations on the initial shape mesh are frozen before applying a rule ("Modify" > "Freeze Transformations"). From a25ef7fb36a65c7bcc5e321602e80ada09e0d155 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Wed, 14 Jun 2023 10:46:24 +0200 Subject: [PATCH 22/29] Fix typo in installer --- deploy/build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/build.xml b/deploy/build.xml index e3603aa3..1bb7f2c0 100644 --- a/deploy/build.xml +++ b/deploy/build.xml @@ -102,10 +102,10 @@ - + - + From b70f8d959f142d480f63b4b2575d93ed9b674787 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Wed, 14 Jun 2023 16:52:26 +0200 Subject: [PATCH 23/29] Switch to prt 3.0 --- src/common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.cmake b/src/common.cmake index 07415665..b457df11 100644 --- a/src/common.cmake +++ b/src/common.cmake @@ -45,7 +45,7 @@ if (NOT prt_DIR) set(PRT_TC "gcc93") endif () - set(PRT_VERSION "2.7.8538") + set(PRT_VERSION "3.0.8905") set(PRT_CLS "${PRT_OS}-${PRT_TC}-x86_64-rel-opt") set(PRT_URL "https://github.com/esri/cityengine-sdk/releases/download/${PRT_VERSION}/esri_ce_sdk-${PRT_VERSION}-${PRT_CLS}.zip") From 443239f4e78f6774d2964f10fd6c84fefe15892f Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Wed, 14 Jun 2023 16:52:52 +0200 Subject: [PATCH 24/29] Use new API to get ruleFile --- src/serlio/utils/Utilities.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/serlio/utils/Utilities.h b/src/serlio/utils/Utilities.h index 6cf17b6b..566fc39b 100644 --- a/src/serlio/utils/Utilities.h +++ b/src/serlio/utils/Utilities.h @@ -151,6 +151,7 @@ std::string objectToXML(std::unique_ptr& ptr) { AttributeMapUPtr createValidatedOptions(const wchar_t* encID, const prt::AttributeMap* unvalidatedOptions = nullptr); inline std::wstring getRuleFileEntry(ResolveMapSPtr resolveMap) { +#if PRT_VERSION_MAJOR < 3 const std::wstring sCGB(L".cgb"); size_t nKeys; @@ -162,6 +163,14 @@ inline std::wstring getRuleFileEntry(ResolveMapSPtr resolveMap) { } return {}; +#else + prt::Status status = prt::STATUS_UNSPECIFIED_ERROR; + const wchar_t* cgbKey = resolveMap->findCGBKey(&status); + if (cgbKey == nullptr || (status != prt::STATUS_OK)) + return {}; + + return std::wstring(cgbKey); +#endif } constexpr const wchar_t* ANNOT_START_RULE = L"@StartRule"; From 3a7ff14e316df7b6391862896d5865fae55bc6a6 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Thu, 15 Jun 2023 08:14:52 +0200 Subject: [PATCH 25/29] Update changelog --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0be226a9..8bb46375 100644 --- a/README.md +++ b/README.md @@ -189,11 +189,17 @@ Currently we only support one material type per mesh (see [known limitations](#k ## Release Notes -### v2.2.0 (2023-01-XX) -Required Cityengine version: 2022.1 or older. +### v2.2.0 (2023-06-XX) +Required Cityengine version: 2023.0 or older. + +#### Added: +* Support for Maya 2023. #### Changed: -* Updated Procedural Runtime (PRT) to 2.7 (corresponds to CityEngine 2022.1). +* Updated Procedural Runtime (PRT) to 3.0 (corresponds to CityEngine 2023.0). + +#### Removed: +* Support for Maya 2019. ### v2.1.0 (2022-07-06) Required CityEngine version: 2022.0 or older. From 660e5638c64b2c152c11d5675867309a0103c421 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Thu, 15 Jun 2023 08:20:11 +0200 Subject: [PATCH 26/29] Remove dev.0 from buildnr --- src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0e9d9f9f..fbb286b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,7 +13,6 @@ include(common.cmake) set(SRL_VERSION_MAJOR 2) set(SRL_VERSION_MINOR 2) set(SRL_VERSION_PATCH 0) -set(SRL_VERSION_PRERELEASE "dev.0") if (NOT SRL_VERSION_BUILD) set(SRL_VERSION_BUILD DEV) From 09fbd4cefc3824d34b18ca5b09dbc3c06a42bc48 Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Thu, 15 Jun 2023 17:32:22 +0200 Subject: [PATCH 27/29] Set release date for serlio v2.2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bb46375..2a1f100b 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ Currently we only support one material type per mesh (see [known limitations](#k ## Release Notes -### v2.2.0 (2023-06-XX) +### v2.2.0 (2023-06-15) Required Cityengine version: 2023.0 or older. #### Added: From ff6723e403b18fc48df5ebf89766d85ef3da31fa Mon Sep 17 00:00:00 2001 From: Christian Knieling Date: Fri, 16 Jun 2023 16:00:28 +0200 Subject: [PATCH 28/29] Remove dev suffix from installer --- deploy/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/build.xml b/deploy/build.xml index 1bb7f2c0..d5646f86 100644 --- a/deploy/build.xml +++ b/deploy/build.xml @@ -19,7 +19,7 @@ - + From b8b43799f2b14c434ead00b24922a8ebda2f2b90 Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Thu, 29 Jun 2023 14:42:18 +0200 Subject: [PATCH 29/29] Updated release notes --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d62703ce..bb5c7eb3 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,7 @@ Required Cityengine version: 2023.0 or older. #### Changed: * Updated Procedural Runtime (PRT) to 3.0 (corresponds to CityEngine 2023.0). +* Fixed sorting of rule attributes in the Attribute Editor to get same behavior as in the CityEngine Inspector. #### Removed: * Support for Maya 2019.