-
Notifications
You must be signed in to change notification settings - Fork 125
Update for Maya 2022 #1235
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
Update for Maya 2022 #1235
Conversation
f9d372d to
3671f04
Compare
|
This is now rebased so only the Maya commits remain |
3671f04 to
d42eebf
Compare
python/IECoreMaya/Menu.py
Outdated
| raise IECore.Exception( "Definition is not a valid IECore.MenuDefinition object." ) | ||
|
|
||
| allPaths = dict(definition.items()).keys() | ||
| allPaths = list(dict(list(definition.items())).keys()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
There was a problem hiding this comment.
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|]+)+\|?$" ) |
There was a problem hiding this comment.
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|]+)+|?$" )
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 9a8db57
python/IECoreMaya/NodeParameter.py
Outdated
| @staticmethod | ||
| def pathValidator(): | ||
| return re.compile( "^(\|?[^\t\n\r\f\v\|]+)+\|?$" ) | ||
| return re.compile( r"^(|?[^\t\n\r\f\v|]+)+\|?$" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 9a8db57
bradleyhenke
left a comment
There was a problem hiding this 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
d42eebf to
9a8db57
Compare
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....