def main():
root_LOC=cmds.spaceLocator (n = 'root_LOC', r = 2)
cmds.move (0, 18.485, -2.815, 'root_LOC', relative=True)
print root_LOC
root_JNT=cmds.joint (n = 'root_JNT', r = 2)
cmds.move (0, 18.485, -2.815, 'root_JNT', worldSpace=True)
print root_JNT
root_CTL=cmds.circle(n = 'root_CTL', r = 2)
cmds.move (0, 18.485, -2.815, 'root_CTL',objectSpace=True, relative=True)
print root_CTL
main()
ERROR I AM GETTING:
# Error: 'list' object is not callable
# Traceback (most recent call last):
# File "<maya console>", line 14, in <module>
# File "<maya console>", line 4, in main
# TypeError: 'list' object is not callable #
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/kC3e3AYx214/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To post to this group, send email to python_in...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
1. root_LOC=cmds.spaceLocator (n = 'root_LOC', r = 2)
cmds.move (0, 18.485, -2.815, 'root_LOC', relative=True)
> here, you making a loctor in maya and assigning it to the variable name root_LOC, but in the next line(cmds.move), you using the string name of the locator, which is not so appropriate way of doing the stuff. Use the variable name itself.And if the any node of name 'root_LOC' already exists in scene, the line 1 will create a locator with different name and your line 2 will move the old node having name 'root_LOC'.
use,
root_LOC=cmds.spaceLocator (n = 'root_LOC', r = 2)
# here is the change
cmds.move (0, 18.485, -2.815, root_LOC, relative=True)
2. cmds.move (0, 18.485, -2.815, root_LOC, relative=True)
> use xform command to do the job instead of the move command.
root_JNT # and this isn't
[u'root_CTL', u'makeNurbCircle1'] # <- the circle keeps its construction history as the second in the list so there are two items.