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

Fool-proof plug-in load #62

Merged
merged 10 commits into from
Sep 4, 2021
Merged

Fool-proof plug-in load #62

merged 10 commits into from
Sep 4, 2021

Conversation

mottosso
Copy link
Owner

@mottosso mottosso commented Jun 16, 2021

Fixes #61

Special Case Fix

This also addresses a special case of querying connections to elements of an array.

b["arrayAttr"] = Long(array=True)
b["arrayAttr"][0] >> a["ihi"]
assert a["ihi"].connection() == b
assert a["ihi"].connection(plug=True) == b["arrayAttr"][0]

This didn't use to work, as the plug was automatically converted from a networked to non-networked plug using findPlug. And it didn't like indices in the name given, e.g. worldMatrix[0].

strict=True

Turns out, MSelectionList.add() is lazy. It'll accept the shortest path to a node, such as myNode even though the actual name is someNamespace:|myNode. So, does myNode exist? No! That's what strict does.

assert cmdx.exist("myNode", strict=False)
assert not cmdx.exist("myNode", strict=True)
assert not cmdx.exist("myNode")  # New default

@monkeez
Copy link
Collaborator

monkeez commented Jul 5, 2021

The inputs method was from the Node class which could have multiple inputs.

@mottosso
Copy link
Owner Author

mottosso commented Jul 5, 2021

The inputs method was from the Node class which could have multiple inputs.

Oh yes.

mottosso added 4 commits July 5, 2021 07:52
- Return native Quaternion types for asQuaternion() and inverse()
- Make Divider attributes non-keyable per default
- Append to existing animation cuves if they exist
- Add minTime(), maxTime(), animationStartTime(), animationEndTime()
- Add Vector.isEquivalent
- Add Quaternion.asEulerRotation
- Add Quaternion.inverse
- Add TransformationMatrix.setRotatePivot
- Print rotation of TransformationMatrix in degrees rather than radians
@mottosso
Copy link
Owner Author

mottosso commented Sep 4, 2021

These latest tweaks should have gone into its own PR, but sometimes one can be lazy.

  • Return native Quaternion types for asQuaternion() and inverse()
  • Make Divider attributes non-keyable per default
  • Append to existing animation cuves if they exist
  • Add minTime(), maxTime(), animationStartTime(), animationEndTime()
  • Add Vector.isEquivalent
  • Add Quaternion.asEulerRotation
  • Add Quaternion.inverse
  • Add TransformationMatrix.setRotatePivot
  • Print rotation of TransformationMatrix in degrees rather than radians

@mottosso mottosso merged commit f8eefbf into master Sep 4, 2021
@mottosso mottosso deleted the pluginload branch January 22, 2022 09:56
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.

Two users, one machine
2 participants