ScriptSpot

Forum topic · General Scripting

uv editor questions

By roosterMAP · 2012-08-28

Description

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 (1)

miauu · 2012-08-28

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)