Skip to content

Conversation

@andrewkaufman
Copy link
Member

This gets all tests (and some basic scene shape interactive use) working in Maya 2022 with python 3.

The PR is built on top of #1232, so only the commits with "Maya" in the message need review. I'll rebase after that one is merged.

Also note I have not built this for Maya 2020... at IE we don't have a good way to decouple Cortex 10.4 (main) dependencies from VFX Platform dependencies. I probably could do it if need be, but the current plan at IE is to upgrade all DCCs at once to the VFX2021-capable-versions and leave gcc6/py2 in the past, so I wasn't sure it was worth the effort....

@andrewkaufman andrewkaufman added the maya Issues related to the Cortex Maya integration label Feb 12, 2022
@andrewkaufman andrewkaufman self-assigned this Feb 12, 2022
@andrewkaufman andrewkaufman force-pushed the maya2022 branch 2 times, most recently from f9d372d to 3671f04 Compare February 14, 2022 17:31
@andrewkaufman
Copy link
Member Author

This is now rebased so only the Maya commits remain

raise IECore.Exception( "Definition is not a valid IECore.MenuDefinition object." )

allPaths = dict(definition.items()).keys()
allPaths = list(dict(list(definition.items())).keys())
Copy link
Contributor

Choose a reason for hiding this comment

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

lol

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed in 06d9eab

@staticmethod
def pathValidator():
return re.compile( "^(\|?[^\t\n\r\f\v\|]+)+\|?$" )
return re.compile( r"^(|?[^\t\n\r\f\v|]+)+\|?$" )
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there is one more backslash that can be removed at the end. re.compile( r"^(|?[^\t\n\r\f\v|]+)+|?$" )

Copy link
Contributor

@bradleyhenke bradleyhenke Feb 15, 2022

Choose a reason for hiding this comment

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

Actually, it is incorrect but for a different reason. The | is a special character so it should either be placed in a character class [|] or use a backslash \|. I think the original expression may have been ill-formed but accepted by python. The first pipe is incorrect, but the last pipe is ok.

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed in 9a8db57

@staticmethod
def pathValidator():
return re.compile( "^(\|?[^\t\n\r\f\v\|]+)+\|?$" )
return re.compile( r"^(|?[^\t\n\r\f\v|]+)+\|?$" )
Copy link
Contributor

@bradleyhenke bradleyhenke Feb 15, 2022

Choose a reason for hiding this comment

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

Same here.

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed in 9a8db57

Copy link
Contributor

@bradleyhenke bradleyhenke left a comment

Choose a reason for hiding this comment

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

I double checked, and I don't think the new regex compiles correctly.

This seems a particularly wasteful update... I hope it doesn't impact performance of `next()` noticably
This should be Python 2.7 & 3.7 compatible, but I am not positive I have implemented it correctly...
I believe PyBytes_* was available in Py2 as well
Its possible most of these are unnecessary but Im not sure its worth figuring out which
I have not found a way to run maya without this being true and the code was not compiling for Py3
This was causing some Maya 2022 builtin startup hooks to fail
MenuDefinition.items() returns a list of tuples rather than a generator, so the line can be written slightly less rediculously
@andrewkaufman andrewkaufman merged commit 7f59e66 into ImageEngine:main Feb 17, 2022
@andrewkaufman andrewkaufman deleted the maya2022 branch February 17, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maya Issues related to the Cortex Maya integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants