setting 3Float values through variables in python


#1

Hello to every hardworking artist out there

I have a question, I am trying to input the aimVector and UpVectors of an aimconstraint created based on selection through a bunch of variables, however it is giving me errors and I can’t figure out how I should go about this problem. AimVector and upVector require three float values. and the command I have tried so far is setAttr. I am open to any suggestion even if I need to use pymel I wouldn’t mind.

A sample code for the problem I am facing:
import maya.cmds as mc

babagaeidi=mc.ls(sl=1)
xxx=1
yyy=1
zzz=1
for tryOuts in babagaeidi:
aimthem=mc.createNode(‘aimConstraint’)
mc.setAttr(‘aimthem.aim’,xxx,yyy,zzz,type=“float3”)

Thanks a bunch in advance

*note: I have figured it out