I don't think Python is any more "accurate" at math than MEL is. The reasons why you pick Python over MEL are others: -Much faster (something which becomes clear when you deal with many objects/components or perform math-based operations) -Much better syntax - more readable and not as hard to fuck up with -You still have…
I highly recommend this book if you are just starting out: [ame="https://www.amazon.com/Maya-Python-Games-Film-Reference/dp/0123785782"]Maya Python for Games and Film: A Complete Reference for Maya Python and the Maya Python API: Adam Mechtley, Ryan Trowbridge: 9780123785787: Amazon.com: Books[/ame]
Nightshade UV Editor 2.0.1 has this feature. Select an edge or two UV's and run "Orient Edge". See my signature for the download link. If you still want to code this yourself then you need to calculate the arc tangent in degrees. You will get a result ranging between -90 and +90 degrees - which is the value that you need…
What mark up menu are you talking about? Accuracy - when you have 2 positions of a straight line, you can use math to find the exact angpe that line is doing. You know, math stuff. Python offers you the function to do exactly that. In a sense you can re-write that function yourself if you know the math behind it.
Rotating 1 degree is a neat idea. For more accuracy you may want to use Python's Math module. It gives you similar atan method along with pi and degrees. from maya import cmdsfrom math import atan2, degrees, pi# Assuming you have 2 UV selectedUVs = cmds.ls(sl=1, fl=1) p1 = cmds.polyEditUV(UVs[0], q=1, u=1)p2 =…
thanks for the answer, but the mel script that i used, also used math and trigenometrie to calculate how much to rotate, i dont see, why it should not be as accurate as the phython script. i'm talking about the marktin menu in maya, my bad :)