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

Matrix access API #10

Open
mottosso opened this issue Aug 25, 2020 · 0 comments
Open

Matrix access API #10

mottosso opened this issue Aug 25, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mottosso
Copy link
Owner

Maya 2020 and beyond has a greatly improved UI for dealing with matrices. Let's facilitate that.

Sometimes, you just want to view or modify members of a matrix.

>>> import cmdx
>>> mat = cmdx.Matrix4()
>>> mat[1, 3]
5.5
>>> mat[0, 3] = 12  # I.e. translate X
>>> mat[0]  # Print row
(1, 0, 0, 12)
>>> mat[, 2]  # Print column
(1, 0, 0, 0)
>>> mat[0] = (1, 0, 0, 11)  # Write row
>>> someNode["myMatrix"] = cmdx.MatrixAttribute(default=mat)

Replicate NumPy's array interface for familiarity.

@mottosso mottosso added the enhancement New feature or request label Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant