ECToo / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

Parenting to world inconsistencies #268

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the problem.
Parenting to world seems to have inconsistencies across several commands.  
Depending on what command is used, passing a parent flag None will either error 
out, or parent the object to world.  Depending on what command is used, 
parenting an object already parented to world will raise an error.

What Version of Maya are you using?
2012

On what operating system? (be as specific as possible and include service
packs, 64bit vs 32bit, etc)
Windows 7 x64

What Version of PyMEL are you using?
1.0.3

What is the expected output? What do you see instead?
If a parent flag is set to None, I expect to see the node parented to the 
world.  If a node already parented to world is set to be parented again to the 
world, I would expect no errors to be raised and the node to be left alone.

If possible, provide a few lines of code to reproduce the problem. It helps
us if your code will reproduce the problem from a new scene.

The group() command has this problem with the parent flag.  The following will 
error out:
nodeOne = group(em = 1)
nodeTwo = group(em = 1, parent = nodeOne.getParent())

The same command with the createNode() command works as expected:
nodeOne = group(em = 1)
nodeTwo = createNode('transform', parent = nodeOne.getParent())

The parent command will error out if you try to parent a node to the world that 
is already there.  The following fails:
nodeOne = group(em = 1)
parent(nodeOne, world = 1)

Setting a node's parent to world will work as expected:
nodeOne = group(em = 1)
nodeOne.setParent(world = 1)

Does maya.cmds exhibit the same problem?

Please provide any additional information below.
There may be more commands that exhibit this problem, these are only the ones 
I've found recently.

Original issue reported on code.google.com by assumpti...@gmail.com on 7 Feb 2012 at 10:19