Hi everybody!
I'm pretty new to Python programming and to this group :)
I have a problem with an setAttr command : cmds.setAttr( 'myvariable', 5 )
I want to use it with a variable ( and an extra string) to define my
attribute : setAttr = cmds.setAttr(ctrlselected + '.FKIK_Blend', 0,
edit=True)
But maya doesn't like this line : # Error: TypeError:script.py line 210:
can only concatenate list (not "str") to list #
Is it possible to use a variable ?
I will be very happy if someone have a solution, because I really need this
line of code :)
exemple of my code :
#Button control IK/FK
fkPath = _PROJ_ROOT + "/Icons/Fk.png"
self.widgets[name +"_L_arm_FKButton"] = cmds.symbolButton (w =
50, h=50, image = fkPath)
cmds.symbolButton(self.widgets[name +"_L_arm_FKButton"], edit =
True, c = partial(self.L_arm_FK,[namespace +"L_Arm_CtrlShape"] ))
#place button control IK/FK
cmds.formLayout(self.widgets[name +"_formLayout"], edit = True,
af = [ (self.widgets[name +"_L_arm_FKButton"],'right', 30),
(self.widgets[name +"_L_arm_FKButton"], 'top', 190) ])
def L_arm_FK(self,ctrlselected ,*args ):
#so I want something like : boby:L_Arm_CtrlShape.FKIK_Blend
setAttr = cmds.setAttr(ctrlselected + '.FKIK_Blend', 0, edit=True)
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe