ghostlake114
06-07-2008, 10:23 AM
This is the snippet
on alignMinU pressed do
(
local uvsel = uv.getselectedvertices() as array
local mid = 0
mid = amin (for i in uvsel collect (uv.getvertexposition currenttime i).x)
--mid = uvsel.count
mid = mid
undo "Align Min U" on
(
uv.forceupdate false
uv.movex mid
uv.forceupdate true
uv.updateview()
)
)
So problem happen If user dont select any vertices but press the button. The mid variable will become undefined.
I dont know what undefined variable is. I want to add an if command to check mid value is "undefined" or not to go to align Min U.
Thanks for any help
on alignMinU pressed do
(
local uvsel = uv.getselectedvertices() as array
local mid = 0
mid = amin (for i in uvsel collect (uv.getvertexposition currenttime i).x)
--mid = uvsel.count
mid = mid
undo "Align Min U" on
(
uv.forceupdate false
uv.movex mid
uv.forceupdate true
uv.updateview()
)
)
So problem happen If user dont select any vertices but press the button. The mid variable will become undefined.
I dont know what undefined variable is. I want to add an if command to check mid value is "undefined" or not to go to align Min U.
Thanks for any help
