Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38
  1. #11
    Join Date
    Jan 2004
    Location
    Sunny Southern California
    Posts
    3,828
    Here's a few more:

    Code:
    //Toggle Hypershade
    if ( `window -exists hyperShadePanel1Window` )
    deleteUI -window hyperShadePanel1Window; 
    else 
    tearOffPanel "Hypershade" "hyperShadePanel" true;
    
    //Toggle Hypergraph
    if ( `window -exists hyperGraphPanel1Window` )
    deleteUI -window hyperGraphPanel1Window; 
    else 
    tearOffPanel "Hypergraph" "hyperGraphPanel" true;
    
    //Toggle Multilister
    if ( `window -exists multiListerPanel1Window` ) 
    deleteUI -window multiListerPanel1Window; 
    else 
    tearOffPanel "Multilister" "multiListerPanel" true;
    Dez
    Pipeline Technical Director
    Legend 3D | VFX

  2. #12
    Join Date
    Apr 2004
    Posts
    2
    Hi there,

    here is a script was i made.This script creates a window where you can control some of the main attributes of all your selected cameras.
    You dont need this everyday,but if you setup your cameras ,this one can be verry handy.

    Any comments are welcome, 'cause this is my 1st one!!!



    greets Kilik
    Attached Files Attached Files

  3. #13
    Join Date
    Aug 2002
    Location
    Maryland
    Posts
    2,126
    Heres a script I made, its basically just a popup window that lets you choose a grid sive of a multiple of 8, from 2 - 128. Useful for game developers. A fairly simple one too.

    PHP Code:
    //----------------------------
    //Grid size changing made easy.
    //By Coolhead:
    //Coolhead@gmail.com (Email)
    //Stieffers2100 (AIM)
    //----------------------------

    //Variables
    global string $myWindow;
    string $myLayout "cLayout";

    //Spawn window
    $myWindow = `window -w 105 -h 170 -mxb false -sizeable true -title "Grid Sizer"`;

    //Window properties
    frameLayout -"";
               
    columnLayout $myLayout;
                            
    rowColumnLayout -nc 1 -cw 1 100;
                            
    button -w 100 -"128" -"OneTwentyEight";
                            
    button -w 100 -"64" -"SixtyFour";
                            
    button -w 100 -"32" -"ThirtyTwo";
                            
    button -w 100 -"16" -"Sixteen";
                            
    button -w 100 -"8" -"Eight";
                            
    button -w 100 -"4" -"Four";
                            
    button -w 100 -"2" -"Two";
                            
    setParent $myLayout;
                    
    showWindow;
                    
    //Procedures
    global proc OneTwentyEight ()
    {
      
    grid -size 256cm -sp 128cm -d 1;
    }
    global 
    proc SixtyFour ()
    {
      
    grid -size 256cm -sp 64cm -d 1;
    }
    global 
    proc ThirtyTwo ()
    {
      
    grid -size 256cm -sp 32cm -d 1;
    }
    global 
    proc Sixteen ()
    {
      
    grid -size 256cm -sp 16cm -d 1;
    }
    global 
    proc Eight ()
    {
      
    grid -size 256cm -sp 8cm -d 1;
    }
    global 
    proc Four ()
    {
      
    grid -size 256cm -sp 4cm -d 1;
    }
    global 
    proc Two ()
    {
      
    grid -size 256cm -sp 2cm -d 1;


  4. #14
    Join Date
    Mar 2004
    Posts
    10
    Ah why not...toss in a few little scripts here for everyone to gain some use of...I won't post many of the advanced ones but just the quick little setup stuff.

    This script will allow you to fake GI with the Maya renderer...casts a blue light and creates a dome setup used in production alot. Enjoy!

    Code:
    //========================
    //ct_domeLightSetup.mel
    //========================
    
    //Author: Shawn McClelland 
    
    //===========================
    // creates a full semi circle
    // dome light setup to fake GI
    //============================
    
    //create the original spotLight and position it.
    
    global proc domeLightSetup()
    {
    	spotLight;
    	
    	string $select[] = `ls -sl`;
    	
    	for ($cur in $select)
    	{
    		setAttr ($cur+".scaleX") 6.609;
    		setAttr ($cur+".scaleY") 6.609;
    		setAttr ($cur+".scaleZ") 6.609;
    		setAttr ($cur+".rotateX") -2;
    		setAttr ($cur+".translateZ") 105.554;
    		xform -ws -rp 0 0 0 -sp 0 0 0;		
    	}
    		
    		
    	//duplicate the selected spotLight 4 times and a rotateX value of -22
    	
    	select -r `listTransforms -lights`;
    	duplicate -rr; rotate -r -22 0 0; for ($i=1; $i<4; ++$i) duplicate -rr -st;
    	
    	//select the first 3 lights in the chain and group them.
    	
    	select -r spotLight1 spotLight2 spotLight3 spotLight4 ;
    	Group;
    	
    	//duplicate the selected lights 7 times with a Rotate Y value of 45
    	
    	select -r group1 ; 
    	duplicate -rr; rotate -r 0 45 0; for ($i=1; $i<7; ++$i) duplicate -rr -st;
    	
    	// select the lights and set the intensity to 0.08 and RG values to .9
    	
    		select -r `listTransforms -lights`;
    	
    			string $selection[] = `ls -sl`;
    	
    			for ($node in $selection)
    			{
    				setAttr ($node+".intensity") 0.08;
    				setAttr ($node+".colorR") 0.9;
    				setAttr ($node+".colorG") 0.9;
    			}
    			
    			//select the lights again to enable the depth map shadows.
    			
    			select -r `listTransforms -lights`;
    			
    			string $sel[] = `ls -sl`;
    			
    			for ($current in $sel)
    			{
    				setAttr ($current+".useDepthMapShadows") 1;
    				setAttr ($current+".dmapResolution") 128;
    				setAttr ($current+".dmapFilterSize") 2;
    			}
    	//select all the light groups and rename to domeRow#
    	
    	select -r group1 ;
    	rename "group1" "domeRow1";
    	select -r group2 ;
    	rename "group2" "domeRow2";
    	select -r group3 ;
    	rename "group3" "domeRow3";
    	select -r group4 ;
    	rename "group4" "domeRow4";
    	select -r group5 ;
    	rename "group5" "domeRow5";
    	select -r group6 ;
    	rename "group6" "domeRow6";
    	select -r group7 ;
    	rename "group7" "domeRow7";
    	select -r group8 ;
    	rename "group8" "domeRow8";
    	
    	//select all the groups and group under DomeLight group
    	
    	select -r domeRow1 domeRow2 domeRow3 domeRow4 domeRow5 domeRow6 domeRow7 domeRow8 ;
    	group ;
    	rename "group1" "DomeLight";
    	select -r spotLight5 ;
    	select -add DomeLight ;
    	parent;
    }


    -Shawn
    Technical Director
    www.creaturetd.com

  5. #15
    Join Date
    Jan 2004
    Posts
    5

    toggle visibility

    Courier

    string $mSel[] = `ls -sl`;
    for ($mObj in $mSel) {
    string $mObjAttr = $mObj +".visibility";
    int $mCheck = `getAttr $mObjAttr`;
    if ($mCheck == 0) {
    setAttr $mObjAttr 1;
    }
    else {
    setAttr $mObjAttr 0;
    }
    };



    I replaced this code into H hotkey
    to toggle the visibility of selected object(s).
    (use outliner to select object)

    let me know,
    mEkapob

  6. #16
    Join Date
    Jan 2004
    Location
    Sunny Southern California
    Posts
    3,828
    This is a script to generate your shelves into a floating window so you can maximize your screen real estate for your work area.

    Download the latest version here: Floating Toolbox
    Last edited by DezFX; 11-11-2004 at 01:36 PM.
    Dez
    Pipeline Technical Director
    Legend 3D | VFX

  7. #17
    Join Date
    Dec 2004
    Location
    New Jersey
    Posts
    47
    They may be posted here or maybe not... but here is a listing of links for MEL scripts!

    http://homepages.nyu.edu/~pdr206/mel.html

    Feel free to peruse them all, and email me if you want any of your scripts added to the MEL tutorials page.
    "Can I get a witness to testify;
    Open your eyes realize, electrify!"

  8. #18
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    3
    Heya guys.
    I have recently started this opensource maya toolbox community to develop and combine tools so we shoudl end up with a very usable toolbox with as many as possible common used features.

    At the moment the only official release is a complete copy of my former script - JWToolbox - but if you take a look at the CVS tree, you will find the bleeding edge version of the tool, wich may be unstable from time to time, but at the moment should be quite stable though.

    You will find documentation for the released script on it's homepage and the added tools in CVS are 'split around selection', 'select border' and 'connect vertices' and the toolbox is mostly for modelling at the moment but I really hope that it will extend to different areas of 3D as well.

    As it is open source, everyone can join in the development. PM me or post on the project forum so I can add you as developer and you will gain direct write-access to the CVS.

    Project Website

    Sourceforge project site

    Greets
    - Jakob Welner -
    http://www.jakob.welner.dk

  9. #19
    Join Date
    Jan 2004
    Location
    Sunny Southern California
    Posts
    3,828
    Backface culling toggle:
    Code:
    string $sel[] = `ls -sl`;
    for ($current in $sel)
    {
    	int $val[] = `polyOptions -q -bc $current`;
    	if ($val[0] == 1)
    		polyOptions -fb $current;
    	else
    		polyOptions -bc $current;
    }

  10. #20
    Join Date
    Aug 2003
    Location
    California
    Posts
    3

    Talking

    Quote Originally Posted by spe199
    They may be posted here or maybe not... but here is a listing of links for MEL scripts!

    http://homepages.nyu.edu/~pdr206/mel.html

    Feel free to peruse them all, and email me if you want any of your scripts added to the MEL tutorials page.

    HMMM, the Link is feedin me back a 404 error, .. I am interested in it, if it is not a dead site can you check spelling and resend? Mucho Thanks

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •