The Area http://area.autodesk.com/forum/ The Area en Copyright 2012 2012-02-10T07:22:56+01:00 Key Offset Script? http://area.autodesk.com/forum/autodesk-maya/mel/key-offset-script/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/key-offset-script/page-last/#When:07:09:07Z Hi, I'm looking for an efficient way to control the visibility of multiple object. Ideally I'd like to script the following; Have a null control the visibility of objects, as a null would pass the x or y translate of an object it would turn off or on. Below is a set driven key basically doing what I'm talking about, ideally I'd like to modify this script so it can easily work with multiple objects that I select. Does anyone know of any existing scripts that would do something similar as well? Always looking to save time :) [code] setDrivenKeyframe -currentDriver locator1.translateX pCube1.visibility; // Result: 1 // select -cl ; select -r locator1 ; move -r -os -wd -0.20354 0 0 ; select -cl ; select -r pCube1 ; setAttr "pCube1.visibility" 0; setDrivenKeyframe -currentDriver locator1.translateX pCube1.visibility; // Result: 1 // [/code] 2012-02-07T07:09:07+01:00 MEL error not getting resolved http://area.autodesk.com/forum/autodesk-maya/mel/mel-error-not-getting-resolved/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/mel-error-not-getting-resolved/page-last/#When:15:34:00Z This is a code which I have written to enter all the Names of spheres in a layer and store their co-ordinates in a text file. [code] [b]float $x,$y,$z; int $i; string $filePath="D:sphereCoordinates.txt"; layerEditorSelectObjects jSpheres; string $jointSpheres[]=`ls -sl`; $fileId=`fopen $filePath "a"`; select -d; for($obj in $jointSpheres)//$i=0; $i<28; $i++) { $x=`getAttr $obj.translateX`; $y=`getAttr $obj.translateY`; $z=`getAttr $obj.translateZ`; fprint $fileId("sphere -n"+$obj+" -p " +$x +" "+ $y+" "+ $z+"n"); } fclose $fileId;[/b] [/code] However This code is showing an error: [b]"No object matched name .translateX"[/b] or [b]"No object matched name .tx"..[/b] Please help. 2012-02-06T15:34:00+01:00 how to select the back facing uv? http://area.autodesk.com/forum/autodesk-maya/mel/how-to-select-the-back-facing-uv/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/how-to-select-the-back-facing-uv/page-last/#When:17:46:52Z At the UV Texture Editor, select menu "image">"shade uv", there display the front facing and back facing uv, blue and red color. And I want select the red uv shell( back facing uv) once only or by script. how can I do that? 2012-02-05T17:46:52+01:00 MEL drag and drop on button? http://area.autodesk.com/forum/autodesk-maya/mel/mel-drag-and-drop-on-button/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/mel-drag-and-drop-on-button/page-last/#When:01:29:02Z Hi.... I rey to create a drag and drop on buttons. http://www.naughtynathan.co.uk/?p=308 this whow how to do, but it doesnt work for the drop (the drag is ok) any idea? thanks 2012-02-05T01:29:02+01:00 Simple MEL scripting problem http://area.autodesk.com/forum/autodesk-maya/mel/simple-mel-scripting-problem/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/simple-mel-scripting-problem/page-last/#When:02:48:47Z I hope this is the right place for this... but anyway... I'm building myself a simple floating window ui with icontextbuttons of tools I frequently use. For the most part, it's going well. For some reason though, the row height is set to 50 pixels and I cannot for the life of me figure out why. The test image I'm using is 64x64 and the width of the column is fine but it keeps clipping off the bottom 14 pixels of my image. Below is a small version of my script (to shorten the post). Thanks for any and all help in advance! [code] if (`window -exists jeremysTools`) deleteUI jeremysTools; window -title "jeremysTools" jeremysTools; rowColumnLayout -numberOfColumns 3 -columnWidth 1 64 -columnWidth 2 64 -columnWidth 3 64; iconTextButton -image "C:/Users/jeremy505/Desktop/test.bmp" -h 64 -w 64 -command AppendToPolygonTool -rpt 1; iconTextButton -image ".bmp" -h 64 -w 64 -command HypershadeWindow; [/code] showWindow jeremysTools; 2012-02-03T02:48:47+01:00 Four View (front, side, top persp) layout with fixed panel configuration? http://area.autodesk.com/forum/autodesk-maya/mel/four-view-front-side-top-persp-layout-with-fixed-panel-configuration/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/four-view-front-side-top-persp-layout-with-fixed-panel-configuration/page-last/#When:03:22:49Z [color=orange]Hello AREA Community! After my F2, F3, F4, F5 Hotkeys was assigned to: [code]switchModelView front; switchModelView side; switchModelView top; switchModelView Perspective;[/code] When I'm in Single Pane layout and using them everything is alright. But sometimes when I'm trying to switch from Single to Four Panes layout by QuickLayout bar button or otherwise, panels arrangement (order of viewports) is changing. I don't want to have flow layout. I want always to have my Perpective viewport in topLeft corner, front (Ortho) in bottomLeft, top in topRight and side(Ortho) always bottomRight arranged. How about fixed 4 panel configuration? Is there MEL Script or something for this purpose? Thanks![/color] 2012-01-31T03:22:49+01:00 -cc & -ec wont write the variable? http://area.autodesk.com/forum/autodesk-maya/mel/-cc---ec-wont-write-the-variable/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/-cc---ec-wont-write-the-variable/page-last/#When:10:16:39Z Here's what I have (within my window ) [code]textField -w 200 -tx $gVar_ccAttr_specFootAttr[0] -ec wv_ccAttr_heelUpDown ccAttr_heelUpDown_txField; [/code] the proc being called is in a .mel file with all the other wv_ procs (around 21 of them, all the same layout as this one;other ones wont work properly either) [code] global proc wv_ccAttr_heelUpDown() { global string $gVar_ccAttr_heelUpDown_txField; global string $gVar_ccAttr_specFootAttr[]; print ("Variable updated; New value applied to $gVar_ccAttr_specFootAttr[0] ."); $gVar_ccAttr_specFootAttr[0] = `textField -query -tx $gVar_ccAttr_heelUpDown_txField`; print "Update procedure Complete."; } [/code] The odd thing is: when I do change the textfield, the print commands are executed just fine. sourcing the scripts isnt a problem either. But the variable simply isn't being updated. -.-* It works just fine when I run the $gVar_ccAttr_specFootAttr[0] = `textField -query -tx $gVar_ccAttr_heelUpDown_txField`; when the window is open. But somehow MEL wont do that if its triggered by the -ec nor the -cc flags of the textfield. I dont want to break up my pretty UI with a bunch of ugly buttons again to execute the procs. :< Any help's appreciated! :) 2012-01-29T10:16:39+01:00 Selecting all follicles of the scene? http://area.autodesk.com/forum/autodesk-maya/mel/selecting-all-follicles-of-the-scene/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/selecting-all-follicles-of-the-scene/page-last/#When:07:22:44Z How to select all follicles of scene? so I can put them into a selection list variable. I tried [code] selectType -follicle 1; //.? //.? //.? string $sel []= `ls -sl`; [/code] 2012-01-28T07:22:44+01:00 Radiobuttons -en false and then set to true? http://area.autodesk.com/forum/autodesk-maya/mel/radiobuttons--en-false-and-then-set-to-true/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/radiobuttons--en-false-and-then-set-to-true/page-last/#When:07:19:25Z hi, i am trying to set up a UI that has 2 sets of radioCollections. depending on the state of the first set, the second will become enabled or not. cant get the second set to become enabled. here is the code: [code] { window; columnLayout; // create the first radio collection $radio1 = `radioCollection`; // add some radio buttons to the collection $off = `radioButton -label "Off" -onc "updateradio(0)"`; $on = `radioButton -label "On" -onc "updateradio(1)"`; separator -w 50 -style "single"; // create the second radio collection $radio2 = `radioCollection`; // add some radio buttons to the collection $X = `radioButton -label "X" -en false`; $Y = `radioButton -label "Y" -en false`; $Z = `radioButton -label "Z" -en false`; // edit the radio collections to set the required radio button radioCollection -edit -select $off $radio1; proc updateradio(int $arg) { if($arg){ radioButton -en true $X; radioCollection -edit -select $X $radio2; } } // now show the window showWindow; } [/code] thanks -a 2012-01-28T07:19:25+01:00 Append "usersetup.mel" file? http://area.autodesk.com/forum/autodesk-maya/mel/append-usersetupmel-file/page-last/ http://area.autodesk.com/forum/autodesk-maya/mel/append-usersetupmel-file/page-last/#When:10:02:24Z I just purchased MentalCore for Maya and I've run into a roadblock ... for me anyway. It appears I need to append the usersetup.mel file and this is not my strong suit. Can anyone walk me through this. 2012-01-27T10:02:24+01:00