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

Python API - Regular Locator Nodes are incorrectly assumed to be Bundles #159

Closed
david-cattermole opened this issue Sep 30, 2020 · 1 comment
Assignees
Labels
bug python api The Python API for mmSolver
Milestone

Comments

@david-cattermole
Copy link
Owner

Problem

Using mmSolver.api.get_object_type() on a regular Maya locator node will return mmSolver.api.OBJECT_TYPE_BUNDLE.

Inside the maya.cmds.mmSolver command, Bundles are no different from any other transform node.
There is currently almost no difference between a locator and a Bundle, other than the icon (which is only cosmetic).
No special Bundle shape has been currently implemented.

This is a similar problem to #6.

Expected behavior:

tfm_node= maya.cmds.createNode('transform')
shp_node = maya.cmds.createNode('locator', parent=tfm_node)
obj_type = mmSolver.api.get_object_type(tfm_node)
assert obj_type == mmSolver.api.OBJECT_TYPE_UNKNOWN

bnd = mmSolver.api.Bundle.create_node()
bnd_node = bnd.get_node()
obj_type = mmSolver.api.get_object_type(bnd_node)
assert obj_type == mmSolver.api.OBJECT_TYPE_BUNDLE

Actual behavior:
Currently, a transform with a locator shape node will be detected as a bundle.

Like so:

tfm_node= maya.cmds.createNode('transform')
shp_node = maya.cmds.createNode('locator', parent=tfm_node)
obj_type = mmSolver.api.get_object_type(tfm_node)
assert obj_type == mmSolver.api.OBJECT_TYPE_BUNDLE

Software Versions

  • mmSolver version: All versions.
  • Maya version: All versions.
  • Operating System (OS): All versions.
@david-cattermole
Copy link
Owner Author

This is now fixed in bbac84e, and committed to the develop branch ready for next release.

A bundle is now defined as being only able to move in Translate X, Y and Z, with all other transform values (Rotate, Scale and Skew) being locked and non-keyable. If this does not hold, then it's not a bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug python api The Python API for mmSolver
Projects
None yet
Development

No branches or pull requests

1 participant