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

Implement MPlug getter/setter methods #14

Merged
merged 3 commits into from
May 10, 2021

Conversation

yantor3d
Copy link
Contributor

@yantor3d yantor3d commented May 9, 2021

Added

  • Implement MPlug::as* methods that take POD or MObject
  • Implement MPlug::set* methods that take POD or MObject

wat

  • MPlug::asChar and MPlug::setChar are picky when used via Python - you must set using an integer, but get back a string.

Thank gods for parametrized tests :|

@mottosso
Copy link
Owner

mottosso commented May 9, 2021

Plug::asChar and MPlug::setChar are picky when used via Python - you must set using an integer, but get back a string.

I bet this is pybind11 being clever. Do you think we should do what OM2 do and return an int?

@mottosso
Copy link
Owner

mottosso commented May 9, 2021

Perhaps especially important in Python 3, since it would return.. a unicode character? :S That's far from a char. I think it's expected that setters should input what getters output.

@yantor3d
Copy link
Contributor Author

Good call. I've updated the two methods to deal with ints.

@mottosso mottosso merged commit edca428 into mottosso:master May 10, 2021
@mottosso
Copy link
Owner

Merged, have a look at the new automatic Maya module being built for each release here (need to fix the version number still). :)

@yantor3d yantor3d deleted the rporter/MPlug branch June 6, 2021 17:46
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants