Yeah, or you can cast it as a float <font class="small">Code:</font><hr /><pre> int $a = 5; print ("float a= " + (float)$a/2 + " but int a= " + $a/2 ); </pre><hr />
Hi, Paul Added the extra functionality you were after : - <font class="small">Code:</font><hr /><pre> proc frameSelectedProc() { string $AnyObjects[]= `ls -sl -l`; if(size($AnyObjects)!=0) { FrameSelected; } else { string $visibleObjects[]; clear $visibleObjects; for ($layer in ` ls -typ "displayLayer"`) { if (` getAttr…
Hi, Glad it's working for you. I can see the benefit of what you require, to add the functionality of deselecting everything after the frame selected command, just add the following line select -cl; as shown here : - <font class="small">Code:</font><hr /><pre> string $visibleObjects[]; clear $visibleObjects; for ($layer in…
For say right, since I use Maya I bagan to learn Mel script... Because maya suck for lot of reasons... (has good snap tools but...) So, about move objects in absolute world, you have some Mel script commands.. then for move all your selection in absolute position : <font class="small">Code:</font><hr /><pre>float…
Hi, Thanks to 'unsmoothed' from cgtalk, who has helped me out with the layer code, I've come up with the following solution to your frame all ( and not objects hidden - via layer visibility ) objects. Copy this to a shelf item or your scripts folder and either use the shelf item to execute or assign it to a hotkey, note,…
Hmm, inadvertently that script was working fine for me everytime I ran it, yet when I boot up Maya this morning, not working! Anyway, I've rejigged the code : - <font class="small">Code:</font><hr /><pre> string $visibleObjects[]; clear $visibleObjects; for ($layer in ` ls -typ "displayLayer"`) { if (` getAttr ($layer +…
Hi Mop! I don't know if this is what you want, but I just did this one (need some fun ) Then for the Hotkeys, Maya stocks that in 2 or 3 files, I think that suck, then I have a "sama_PersonnalHotkey.mel" in my script directory. And I edit the userSetup.mel in same directory for source my file and it launch it every maya…
It's kind of true. If you're used to Max, it's hard to get any decent polygon workflow unless you overhaul your hotkeys and tools. Regarding question 3, I made hotkeys ctrl+1-6 to this script-block to accomplish that exact thing. (window->settings/prefs->hotkey editor->User->New) <font class="small">Code:</font><hr /><pre>…