Ya..Here is the code- [Haven't used any loops just for testing purposes]
I select three joints in a hierarchy & then run the following script-
import maya.cmds as cmds
selJoints = cmds.ls(selection=True)
print selJoints
wPos0 = cmds.xform(selJoints[0], query=True, matrix=True, worldSpace=True)
print wPos0
a1 = "%.3f" %wPos0[12]
a2 = "%.3f" %wPos0[13]
a3 = "%.3f" %wPos0[14]
print a1
print a2
print a3
wPos1 = cmds.xform(selJoints[1], query=True, matrix=True, worldSpace=True)
print wPos1
b1 = "%.3f" %wPos1[12]
b2 = "%.3f" %wPos1[13]
b3 = "%.3f" %wPos1[14]
print b1
print b2
print b3
wPos2 = cmds.xform(selJoints[2], query=True, matrix=True, worldSpace=True)
print wPos2
c1 = "%.3f" %wPos2[12]
c2 = "%.3f" %wPos2[13]
c3 = "%.3f" %wPos2[14]
print c1
print c2
print c3
cmds.polyCreateFacet( point=[(a1,a2,a3),(b1,b2,b3), (c1,c2,c3)] )
cmds.CenterPivot("polySurface1")
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.