Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Creating your own shortcuts? (https://simplymaya.com/forum/showthread.php?t=35221)

riwa 03-03-2011 02:44 AM

Creating your own shortcuts?
 
Hi. Im very new to maya. Ive been using a very simple gridbased 3d software and am now learning maya.

I would like a shortcut that allow me to change the grid -> size -> subdivisions to my liking.

I would need a way to switch between 64/32/16/8/1. This is so I can easily create the correct sizes required for that particular game.

Thanks!

Regards
Richard

Gen 03-03-2011 04:32 AM

If you were to go to the command line and enter this code..

Code:

grid -size 32;
it would change your grid to 32 units.

or you can assign this code that has a cute little interface I made to a custom hotkey.

Code:

{


        window -title "Grid Size Picker Thingy" -s 0 -tlb 1;
        formLayout  -w 150 -h 150;
        columnLayout -rs 5 -cal "left" -adj 1  -w 150 -h 150;

        text -l "Choose size";
        separator -st "in" -hr 1 -w 150;
        radioCollection;
        radioButton -l "1" -onc ("grid -s 1;");
        radioButton -l "8" -onc ("grid -s 8;");
        radioButton -l "16" -onc ("grid -s 16;");
        radioButton -l "32" -onc ("grid -s 32;");
        radioButton -l "64" -onc ("grid -s 64;");

        showWindow ;
       
}


riwa 03-03-2011 05:39 AM

Wow that is amazing. However it changes the amount of grids and not the grid-subdivision. How can I modify that script so it covers that particular variable instead?

Gen 03-03-2011 05:51 AM

Ah! I guess I skip read over the "subdivision" part. Just change the "-s" for size flag to "-d" for subdivisions.

Code:

grid -d 32;

riwa 03-03-2011 06:26 AM

Thanks man! You're the greatest =P


All times are GMT. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018