Message 1 of 2
python doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm not good at English.
It can be difficult to read. excuse me.
I'm learning Python using MAYA.
what i want to do
I want to change the thickness of NurbsCurve all at once.
Please have a look at the code and tell me what is wrong.
Thank you for watching.
from maya import cmds
nodes = cmds.ls(selection=True)
for node in nodes:
if cmds.window(ram, exists =True):
cmds.deleteUI(ram)
ram = cmds.window( w=300, h=300 )
cmds.columnLayout( adj=True )
cmds.getAttr(node + ".lineWidth")
cubW = cmds.floatField(pre=1, editable = True, value = 1,)
cmds.button(l= "Apply", c="LW()" )
cmds.showWindow(ram)
def LW():
myCubeWidth = cmds.floatField(cubW , q = True, value = True)
finalThickness = cmds.setAttr(node + ".lineWidth", n= "LW")