ECToo / pymel

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

mel2py: mel commands which always return single-item lists #204

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In mel, many commands which always return only a single item will still return 
a list - ie, spaceLocator

>>> print m2p.mel2pyStr('$foo = `spaceLocator`;print $foo[0];', 
forceCompatibility=1, pymelNamespace='pm')
import pymel.all as pm
foo=pm.spaceLocator()
print foo[0]

This will yield an error, as pm.spaceLocator returns a node, not a list; while 
this might be considered acceptable if forceCompatibility is off, with 
forceCompatibility on, it should probably give something like

foo=[pm.spaceLocator()] 

Original issue reported on code.google.com by elron...@gmail.com on 14 Jun 2010 at 11:07

GoogleCodeExporter commented 9 years ago

Original comment by elron...@gmail.com on 20 Jan 2011 at 11:51

GoogleCodeExporter commented 9 years ago

Original comment by elron...@gmail.com on 24 Jan 2011 at 8:15