align plane with face normal

116 views
Skip to first unread message

med....@gmail.com

unread,
Feb 9, 2016, 1:05:34 PM2/9/16
to Python Programming for Autodesk Maya
Hi, I'm new in python , I try to make script to generate tree paper so please , can u tell me how to orient a plane with face's normal. Thanks

Erik Spellerberg

unread,
Feb 17, 2016, 7:13:03 AM2/17/16
to Python Programming for Autodesk Maya, med....@gmail.com
You could try the mel command snap3PointsTo3Points()

cmds.select (vertices_snap_to[:3], r=True)
cmds.select (vertices_snap[:3], addFirst=True)
mel.eval("snap3PointsTo3Points(0)")

Marcus Ottosson

unread,
Feb 17, 2016, 7:17:32 AM2/17/16
to python_in...@googlegroups.com, med....@gmail.com
You can also attach a follicle to the face, the follicle will then inherit (part of) it's orientation. Then you can parent things to it.

--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a0ddb1e6-1984-444f-be48-0ef5f084afba%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Reply all
Reply to author
Forward
0 new messages