To convert the string to a float, you just need to use the builtin function float().
For example, cmds.polyCreateFacet( p=[ ( float(selX), 0, 0), (2,1,2), (2,2,3) ] ) On Tuesday, June 12, 2012 3:54:40 PM UTC-7, pipo pescattore wrote: > > Sorry if I am re posting but I had a problem with my email, here is my > problem > > Hello, I have a locator which I get his localPosition by using this > command= > selX = cmds.getAttr(locator+'.localPositionX') > > > the thing is that I need to pass that parameter to this function that only > accepts floats > > cmds.polyCreateFacet( p=[(0,0,0), (2,1,2), (2,2,3)] ) > > I tried doing this > > cmds.polyCreateFacet( p=[(selX,0,0), (2,1,2), (2,2,3)] ) > but did not work > > how can I convert the string value and pass that parameter to the > polyCreateFacet input? > > Thanks > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
