Adverti horiz upsell

ScriptsManager 2.0.3 for Maya (maya script)

ScriptsManager is a handy script, which can...

License
Button download
3,114 Downloads

Compatibility

  • 2012, 2011, 2010, 9.x, 2009, 2008, 8.x, 7.x, 6.x, 5.x, 4.x, 3.x, 2.x, 1.x

Operating Systems

  • Irix
  • Linux
  • Mac
  • Windows

History

Created:10/29/2002
Last Modified:08/27/2011
File Size: 22.6 KB

Feature Request

I need some help please

Status:pending
Date:03/06/2012
Submitted by:Ammer Ammer
Sir I need your help, I'm not a perfect programmer, and I know you'll help with this. issue... I'm trying to filter a selection of shaders in hypershade... so that the dialog recognizes phongs shaders and excludes the others.. lets say I selected a bunch of shaders of phongs, blinns, lamberts, etc... the simple script I designed is to deal with the phongs cosinePower attribute, and excludes the others... here is the script it is simple... I need your help... Thank you ! //------Try 3 //I'm trying to make a Filter array for phongs only... Status: Failed !!!! proc filterSelection() { string $sel [] = `ls -sl`; for ($obj in $sel) { if ( `nodeType $obj` == "phong" ) { print ($obj); string $phong [] = {$obj}; print ("This is phong ..... !! \n"); print ($phong) ; } if ( `nodeType $obj` == "blinn" ) print ($obj); } } // From here success .... ! proc Do() { string $sel[] = `ls -sl`; float $minX = 2; float $minX =`intSliderGrp -query -value sliderXMin`; for ( $obj in $sel ) { setAttr ($obj + ".cosinePower") $minX; } } //create a simple placement randomizer using slider values if (`window -exists intSliderWin`) { deleteUI intSliderWin; windowPref -remove intSliderWin; } // this is the window size window -widthHeight 400 250 intSliderWin; columnLayout -width 400; text -label "Adjust Cosine Power for selected phongs?"; button -label "Filter Selection" -command "filterSelection()"; intSliderGrp -label "MinX" -field true -min 2 -max 100 -dc "Do()" sliderXMin; showWindow intSliderWin;

Post a comment: