I tried xView "OverlappedUVWFaces.Check" first, but the function will return all overlapped uvw faces throughout all map channels.Then I found that "Select Overlapped Polygons" button in the UVW editor works well, so I tried to use the function to get overlapped uvw faces, but it seems not work in my code. Can somebody please help me?
fn CheckOverlappedUVWInSecondUV geo=
(
local unwrapMod = geo.modifiers["Unwrap_UVW"]
local overlappingUVWFaces = #{}
local uvChannel = 2
if(classof (unwrapMod) == Unwrap_UVW and unwrapMod.getMapChannel() == UVChannel) then
(
unwrapMod.setMapChannel 2
unwrapMod.selectOverlappedFaces()
overlappingUVWFaces = unwrapMod.getSelectedFaces()
)
else
(
addModifier geo (Unwrap_UVW())
unwrapMod = geo.modifiers["Unwrap_UVW"]
unwrapMod.setMapChannel 2
unwrapMod.selectOverlappedFaces()
overlappingUVWFaces = unwrapMod.getSelectedFaces()
)
if overlappingUVWFaces.numberSet > 0 then
return false
else
return true
)
Solved! Go to Solution.
Link copied