uv editor questions

2 questions:

1. I am trying to find the angle a specific edge is at in the uv editor. I am currently using this command. The problem is that it does the angle calc in 3d space. How do I find the angle in uv space?
angleRot = acos(dot(normalize((polyOp.getVert obj vertsFromEdges[d_j*2]) - (polyOp.getVert obj vertsFromEdges[d_j*2-1]))) (normalize(x_axis)))

2. I eventually want to rotate a uv island about a vert and not about the center of the island. I was using: "$.modifiers[#unwrap_uvw].unwrap2.RotateSelectedCenter angleRot" but its the incorrect rotation. How do i set my center? (btw, the center would be the coordinates of a vert).

Thx! Yall are really helpful.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

Check the code of this

Check the code of this script.

Watch the video to see how the script rotate the islands based on selected edge(center or one of two verts)

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.