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.
Solved by denisT.MaxDoctor. Go to Solution.
Solved by LayTiger. Go to Solution.
Solved by denisT.MaxDoctor. Go to Solution.
so you can use the xView and UVW_Mapping_Clear modifier(s) to temporarily clear unwanted channels.
of course, you can use a temp UVW_Unwrap modifier but it's the much heavier solution.
xView and UVW_Mapping_Clear modifier(s) actually works, thank you very much.
fn CheckOverlappedUVWInSecondUV geo=
(
addModifier geo (UVW_Mapping_Clear())
uvwClear = geo.modifiers["UVW_Mapping_Clear"]
uvwClear.mapID = 1
overlappingUVWFaces = #()
OverlappedUVWFaces.Check currentTime geo &overlappingUVWFaces
overlappingUVWFacesCount = overlappingUVWFaces.count
deleteModifier geo uvwClear
if(overlappingUVWFacesCount > 0) then
(
return false
)
return true
)
@LayTiger wrote:xView and UVW_Mapping_Clear modifier(s) actually works, thank you very much.
fn CheckOverlappedUVWInSecondUV geo=
(
addModifier geo (UVW_Mapping_Clear())
uvwClear = geo.modifiers["UVW_Mapping_Clear"]
uvwClear.mapID = 1
overlappingUVWFaces = #()
OverlappedUVWFaces.Check currentTime geo &overlappingUVWFaces
overlappingUVWFacesCount = overlappingUVWFaces.count
deleteModifier geo uvwClear
if(overlappingUVWFacesCount > 0) then
(
return false
)
return true
)
fn CheckOverlappedUVWInSecondUV geo excludeCh: =
(
uvwClear = undefined
if excludeCh != unsupplied do
(
uvwClear = UVW_Mapping_Clear mapid:excludeCh
addModifier geo uvwClear
)
overlappingUVWFaces = #()
OverlappedUVWFaces.Check currentTime geo &overlappingUVWFaces
if uvwClear != undefined do deleteModifier geo uvwClear
overlappingUVWFaces.count != 0
)
Can't find what you're looking for? Ask the community or share your knowledge.