It's pretty weird-looking, but this works: setAttr(cmds.polyCube(name="Bob")[0]+'.t', (10,5,-6))
I'm not sure what your real requirement is, but to get it on one line I'd be happier using a semicolon: bob = cmds.polyCube(name="Bob")[0]; cmds.setAttr(bob+'.t', 10,5,7) (I'm using cmds instead of mc, but I think it's the same thing) On Thursday, 12 October 2017 08:02:09 UTC+11, jettam wrote: > > Is there a way to make an object and transform it in the same line. > Along these lines. > > mc.polyCube(name="Bob",(.setAttr(t=10,5,6,) ) > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7311b53e-d618-450e-9707-71f90c7770f8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
