Skip to content

Commit

Permalink
Update development build to 1.39.0
Browse files Browse the repository at this point in the history
This changelist updates the development build to 1.39.0, and addresses a few minor edits required to support minor versions more advanced than our test documents.
  • Loading branch information
jstone-lucasfilm committed Jul 13, 2023
1 parent 3e838e2 commit 426389c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MaterialX Version
set(MATERIALX_MAJOR_VERSION 1)
set(MATERIALX_MINOR_VERSION 38)
set(MATERIALX_BUILD_VERSION 8)
set(MATERIALX_MINOR_VERSION 39)
set(MATERIALX_BUILD_VERSION 0)
set(MATERIALX_LIBRARY_VERSION ${MATERIALX_MAJOR_VERSION}.${MATERIALX_MINOR_VERSION}.${MATERIALX_BUILD_VERSION})

# Cmake setup
Expand Down
8 changes: 7 additions & 1 deletion source/MaterialXCore/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ void Document::upgradeVersion()
}

// Upgrade from 1.37 to 1.38
if (majorVersion == 1 && minorVersion >= 37)
if (majorVersion == 1 && minorVersion == 37)
{
// Convert color2 types to vector2
const StringMap COLOR2_CHANNEL_MAP = { { "r", "x" }, { "a", "y" } };
Expand Down Expand Up @@ -1393,6 +1393,12 @@ void Document::upgradeVersion()
minorVersion = 38;
}

// Upgrade from 1.38 to 1.39
if (majorVersion == 1 && minorVersion == 38)
{
minorVersion = 39;
}

std::pair<int, int> upgradedVersion(majorVersion, minorVersion);
if (upgradedVersion == expectedVersion)
{
Expand Down
1 change: 1 addition & 0 deletions source/MaterialXTest/MaterialXFormat/XmlIo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ TEST_CASE("Comments and newlines", "[xmlio]")
mx::XmlReadOptions readOptions;
readOptions.readComments = true;
readOptions.readNewlines = true;
readOptions.upgradeVersion = false;
mx::readFromXmlString(doc, origXml, mx::FileSearchPath(), &readOptions);

// Write the document to a new XML string buffer.
Expand Down

0 comments on commit 426389c

Please sign in to comment.