Hey all,
Firstly to say hi to everyone and I hope that you are all doing great.
First time posting here, so please don’t mind me if I didn’t format my question right!
I need some clarification with getArea() method (maxscript).
The max documentation is a bit unclear about the arguments.
What I need is to get the area within UV space, that faces are occupying. Percentage-wise or any other… Here is my code so far (I am getting 0 as returned (I guess I should supply the arguments, but not sure with what?
facesArea = 0
facesFromUVArea = 0
faceSel = polyop.getFaceSelection $
fSel = faceSel as array
uvArea = 0f
x = 0.0
y = 0.0
refwidth = 0.0
refheight = 0.0
for i=1 to fSel.count do
(
f = polyop.getFaceArea $ fSel[i]
facesArea += f
)
uvw = addModifier $ (UVWUnwrap())
currMod = modPanel.getCurrentObject()
uvFacesSel = currMod.getSelectedFaces()
$.modifiers["Unwrap_UVW"].getArea uvFacesSel $x $y $refwidth $refheight $uvArea $facesArea
format "UVW area is: % face area is: % width is: %" uvArea facesArea refX
Much appreciated for any help,
Cheers!