Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparation for Ufe v4.1 #2960

Merged
merged 1 commit into from
Mar 23, 2023
Merged

Conversation

seando-adsk
Copy link
Collaborator

No description provided.

@seando-adsk seando-adsk requested review from ppt-adsk and feldstj March 22, 2023 17:57
@@ -48,20 +48,31 @@ if(UFE_INCLUDE_DIR AND EXISTS "${UFE_INCLUDE_DIR}/ufe/ufe.h")
endforeach()
set(UFE_VERSION ${UFE_MAJOR_VERSION}.${UFE_MINOR_VERSION}.${UFE_PATCH_LEVEL})

if("${UFE_MAJOR_VERSION}" STREQUAL "0")
if(UFE_MAJOR_VERSION VERSION_EQUAL "0")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched these ufe checks to use VERSION_XXX instead of STR_XXX.

Comment on lines +57 to +63
elseif(UFE_VERSION VERSION_EQUAL "4.1.0")
# Temporary. Once next Maya PR is released with UFE v4.1.0 this should
# be removed (along with all the UFE_PREVIEW_VERSION_NUM checks).
# TODO - YY needs to be replaced with the "last" patch value before the bump
# to 4.1.0.
#set(UFE_PREVIEW_VERSION_NUM 41YY)
message(FATAL_ERROR "Modification required to set UFE_PREVIEW_VERSION_NUM for Ufe v4.1")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prep for the final switch to Ufe v4.1. It will require setting line 62 to the correct value. So make sure that is done by adding the fatal error here.

Comment on lines +64 to +67
elseif((UFE_VERSION VERSION_GREATER_EQUAL "4.0.100") AND (UFE_VERSION VERSION_LESS "5.0.0"))
# Temporary. Once next Maya PR is released with UFE v4.X.0 this should
# be changed into UFE_PREVIEW_VERSION_NUM of 4XYY, where YY is the last value from "4.0.YY"
math(EXPR UFE_PREVIEW_VERSION_NUM "4 * 1000 + ${UFE_MINOR_VERSION} * 100 + ${UFE_PATCH_LEVEL}")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ufe preview version num for Ufe v4.1 while in development.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I'm not clear on and it's possible I messed this up as well, but should this be 4.1.0 instead of 4.0.100? Given that the minor version is being multiplied by 100?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be 4.0.100, because 4.1 is not released yet (minor version 0). So the version string will be 4000 + 0 x 100 + 100, since UFE_PATCH_LEVEL starts at 100, which will give 4100. For UFE 4.2 development, the current UFE minor version will be 1, so the version string will be 4000 + 1 x 100 + 100, giving 4200, as expected.

Comment on lines +73 to +75
REGEX "#define UFE_V[0-9]+(_[0-9]+)?_FEATURES_AVAILABLE$")
foreach(_ufe_tmp ${_ufe_features})
if(_ufe_tmp MATCHES "#define UFE_V([0-9]+)_FEATURES_AVAILABLE$")
if(_ufe_tmp MATCHES "#define UFE_V([0-9]+(_[0-9]+)?)_FEATURES_AVAILABLE$")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional regex to detect the UFE_VX_X_FEATURES_AVAILABLE (such as V4_1).

Copy link
Collaborator

@feldstj feldstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just the one question.

Comment on lines +64 to +67
elseif((UFE_VERSION VERSION_GREATER_EQUAL "4.0.100") AND (UFE_VERSION VERSION_LESS "5.0.0"))
# Temporary. Once next Maya PR is released with UFE v4.X.0 this should
# be changed into UFE_PREVIEW_VERSION_NUM of 4XYY, where YY is the last value from "4.0.YY"
math(EXPR UFE_PREVIEW_VERSION_NUM "4 * 1000 + ${UFE_MINOR_VERSION} * 100 + ${UFE_PATCH_LEVEL}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I'm not clear on and it's possible I messed this up as well, but should this be 4.1.0 instead of 4.0.100? Given that the minor version is being multiplied by 100?

Comment on lines +64 to +67
elseif((UFE_VERSION VERSION_GREATER_EQUAL "4.0.100") AND (UFE_VERSION VERSION_LESS "5.0.0"))
# Temporary. Once next Maya PR is released with UFE v4.X.0 this should
# be changed into UFE_PREVIEW_VERSION_NUM of 4XYY, where YY is the last value from "4.0.YY"
math(EXPR UFE_PREVIEW_VERSION_NUM "4 * 1000 + ${UFE_MINOR_VERSION} * 100 + ${UFE_PATCH_LEVEL}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be 4.0.100, because 4.1 is not released yet (minor version 0). So the version string will be 4000 + 0 x 100 + 100, since UFE_PATCH_LEVEL starts at 100, which will give 4100. For UFE 4.2 development, the current UFE minor version will be 1, so the version string will be 4000 + 1 x 100 + 100, giving 4200, as expected.

@seando-adsk seando-adsk added build Related to building maya-usd repository ready-for-merge Development process is finished, PR is ready for merge labels Mar 23, 2023
@seando-adsk seando-adsk merged commit d8a720f into dev Mar 23, 2023
@seando-adsk seando-adsk deleted the donnels/ufe_version_4_1_preparation branch March 23, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to building maya-usd repository ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants