Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 30-09-2015 , 04:01 PM
Registered User
Join Date: Sep 2015
Posts: 4

Maya Python begginer

Hello, i'm new in maya and special in Python, im traying to make a button, when I press on the button my selected object will rotate 5, 5, 5 (or "and" translate =] )
her is code for object what is work fine but it need to be named =[

my code - work well but with name
PHP Code:
import maya.cmds as mc
mc
.setAttr("cube.rotate"000)
mc.setAttr("cube.translate"000
and my code doesn't work =]]]
PHP Code:
import maya.cmds as mc
selection 
mc.ls(sl 1)
for 
obj in selection:
    
mc.setAttr("obj.rotate"555
Thx

# 2 30-09-2015 , 04:09 PM
Registered User
Join Date: Sep 2015
Posts: 4
I found

PHP Code:
import maya.cmds as cmds
cmds
.rotate(555,) 
works fine for all obj =]]

# 3 01-10-2015 , 01:08 AM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I haven't looked at python syntax for a while, but I suspect you will need something like:

mc.setAttr((obj + ".rotate"), 5, 5, 5)

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads