Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unfold Along U Hotkey/MEL command doesn't exist

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
dovhaliuk.stanislav
280 Views, 3 Replies

Unfold Along U Hotkey/MEL command doesn't exist

Hello. I tried to add the "Unfold Along U" command to the hot button in Hotkeyeditor and It's not in the hotkey editor.
MEL script 

unfold -i 5000 -ss 0.001 -gb 0 -gmb 0.5 -pub 0 -ps 0 -oa 2 -us off

unfolds the entire mesh, but I only need the selected shell.
I tried to write my own scripts - nothing happened. help me please

In the Script Editor and Echo All Command when I press Unfold Along U button [not hotkey] Maya write:

unfold -i 5000 -ss 0.001 -gb 0 -gmb 0.5 -pub 0 -ps 0 -oa 2 -us off lod00_tst:wersdasd.map[8:9] lod00_tst:wersdasd.map[13] lod00_tst:wersdasd.map[15] lod00_tst:wersdasd.map[51:52] lod00_tst:wersdasd.map[55:57] ;

I tried to combine 
unfold -i 5000 -ss 0.001 -gb 0 -gmb 0.5 -pub 0 -ps 0 -oa 2 -us off
and 
$shellUVs = `ls -sl`;
print $shellUVs;

and in some reasone Maya write another values
lod00_tst:wersdasd.f[7]
lod00_tst:wersdasd.f[9:10]
lod00_tst:wersdasd.f[19]
lod00_tst:wersdasd.f[39:40]

💁‍:male_sign:💁‍:male_sign:💁‍:male_sign:💁‍:male_sign:💁‍:male_sign:

Labels (3)
3 REPLIES 3
Message 2 of 4

Hi!

 

Thats because when you use UV Shell selection, you actually select faces, not UV's. But the unfold command only takes UVs as positional input. When you hit the unfold along U button from the menu, Maya automatically converts your selections to UV's, if you do it via code, you have to add that line yourself. This should work for what you want to do:

string $slUVs[] =`polyListComponentConversion -tuv`;
unfold -i 5000 -ss 0.001 -gb 0 -gmb 0.5 -pub 0 -ps 0 -oa 2 -us off $slUVs;

 

I hope it helps!

 

Message 3 of 4

Works. Thank you !! 🦾🦾
Tell me, what should I read to better understand mEl? Please.

Message 4 of 4

Hi!

 

The official documentation is always helpful when you want to work with MEL, it lists most of the stable commands that can be used in MEL.

 

https://help.autodesk.com/cloudhelp/2024/ENU/Maya-Tech-Docs/Commands/

 

Sadly there aren't many good written tutorials on MEL since it is quite a niche language.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report