Invalid syntax

Invalid syntax

rpark7J3CJN
Contributor Contributor
878 Views
3 Replies
Message 1 of 4

Invalid syntax

rpark7J3CJN
Contributor
Contributor

import maya.cmds as mc

for i in range (1,73):
mc.sphere()
mc.sphere(0, 0, -10, relative = True)
mc.move(0, 0, 10, (('nurbsSphere' + str(i) + '.scalePivot'), ('nurbsSphere' + str(i) '.rotatePivot'), relative = True))
mc.rotate(0, 5 * i, 0, r =True, os =True)

 

I don't get why does Maya tell that I have an invalid syntax. I checked everywhere where the order is.

0 Likes
879 Views
3 Replies
Replies (3)
Message 2 of 4

brentmc
Autodesk
Autodesk

Hi,

 

You are missing a plus sign (+) in front of '.rotatePivot'.

Brent McPherson
Principle Software Developer
0 Likes
Message 3 of 4

rpark7J3CJN
Contributor
Contributor
am.png


 
Updating Media

# File "<maya console>", line 6, in <module>
# NameError: name 'o' is not defined #

 

I just ran into another issue, I still don't get why Maya does not recognize operating system.

 

0 Likes
Message 4 of 4

brentmc
Autodesk
Autodesk

Hi,

 

The error is on line 5. The script editor in your version has a bug and line numbers should start from 1, not 0.

In this case you are referring to str(o) and str(i) but the variables o and i are not defined in your script.  

Brent McPherson
Principle Software Developer
0 Likes