Broken/missing function: Unwrap_UVW.snap()

Broken/missing function: Unwrap_UVW.snap()

senorpablo
Advocate Advocate
764 Views
5 Replies
Message 1 of 6

Broken/missing function: Unwrap_UVW.snap()

senorpablo
Advocate
Advocate
I can't get this to work. I get the error: -- Unknown property: "snap" in Unwrap_UVW:Unwrap UVW. Is this just a missing / broken function, or am I doing something wrong?
 
I've tried many things, but this is a general test case:
 

 

b = box()
u = unwrap_uvw()
addmodifier b u
max modify mode
modPanel.setCurrentObject u
u.edit()
b.unwrap_uvw.snap()

 

 
From Maxscript help:
<void><Unwrap_UVW>.snap() 

Presses the Snap button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

0 Likes
Accepted solutions (1)
765 Views
5 Replies
Replies (5)
Message 2 of 6

denisT.MaxDoctor
Advisor
Advisor

something goes wrong...

what max version do you use?

 

try these lines one by one in the max script listener:

b = box()
u = unwrap_uvw()
addmodifier b u
b.unwrap_uvw.snap()
u.snap()

 

they should all work in any max version.

 

0 Likes
Message 3 of 6

senorpablo
Advocate
Advocate

I'm using Max 2020.

 

Listener results:

b = box()
$Box:Box002 @ [0.000000,0.000000,0.000000]
u = unwrap_uvw()
Unwrap_UVW:Unwrap UVW
addmodifier b u
OK
b.unwrap_uvw.snap()
-- Unknown property: "snap" in Unwrap_UVW:Unwrap UVW
-- MAXScript callstack:
--	thread data: threadID:10156
--	------------------------------------------------------
--	[stack level: 0]
--	In top-level
u.snap()
-- Unknown property: "snap" in Unwrap_UVW:Unwrap UVW
-- MAXScript callstack:
--	thread data: threadID:10156
--	------------------------------------------------------
--	[stack level: 0]
--	In top-level

 

0 Likes
Message 5 of 6

senorpablo
Advocate
Advocate

@Swordslayer wrote:

Are you looking for .snapToggle()?


Yes, thank you! 

 

None of the Maxscript documentation I referenced 2020-2022 lists anything other than Snap() for that command--which is incorrect. Showproperties doesn't list the command either. How/where did you figure out it the correct function is SnapToggle()?

 

 

0 Likes
Message 6 of 6

Swordslayer
Advisor
Advisor

Macrorecorder is the fast option, or if you know roughly what you're looking for and macrorecorder won't help, you can use showInterfaces $.unwrapuvw and search through the output.