renaming transform node with api


#1

Hi there,

sorry this is i think a simple thing but i only know how to set the name of a shape node in maya through api. Im doing this for a curve i created.

curveFn = om.MFnNurbsCurve()

curveFn.setName(‘mySpecialCurve’)

but this will set the name for the shape node of the curve. Does anyone know how to set it for the transform node so i can see the name of the curve show up in the outliner.

thanks alot guys,
Sam


#2

transformFn = om.MFnTransform(curveTransform )
transformFn.setName(‘newCurveName’)

this does it apparently