string $indPolyObject[]; $indPolyObject = `ls -sl`; $shaderName = "Diffuse"; $indShaderNode = ( $indPolyObject[0] + "ShaderName" ); $indGenNode = ( $indPolyObject[0] + "GenThis" ); $indSetShaderNode = ( $indPolyObject[0] + "." + $indShaderNode ); $indSetGenNode = ( $indPolyObject[0] + "." + $indGenNode ); addAttr -ln "ShaderName" -sn $indShaderNode -dt "string"; addAttr -ln "GenerateThis" -sn $indGenNode -at "bool"; setAttr $indSetShaderNode -type "string" $shaderName; setAttr $indSetGenNode true;
if( !`objExists "indigoDiffuseNode"` ) { createNode "transform" -n "indigoDiffuseNode"; $indObjectToAddTo = `ls -sl`; //---------------------------------------- Add Attributes // add a string attribute addAttr -ln "ShaderName" -sn "indDifName" -dt "string"; addAttr -ln indDiffuseColor -usedAsColor -at float3; addAttr -ln redCol -at "float" -sn "indDifRed" -parent indDiffuseColor; addAttr -ln greenCol -at "float" -sn "indDifGreen" -parent indDiffuseColor; addAttr -ln blueCol -at "float" -sn "indDifBlue" -parent indDiffuseColor; $iotatRed = ( $indObjectToAddTo[0] + ".indDifRed" ); $iotatGreen = ( $indObjectToAddTo[0] + ".indDifGreen" ); $iotatBlue = ( $indObjectToAddTo[0] + ".indDifBlue" ); $iotatName = ( $indObjectToAddTo[0] + ".indDifName" ); //---------------------------------------- Set Initial Values setAttr $iotatRed 0.5; setAttr $iotatGreen 0.5; setAttr $iotatBlue 0.5; setAttr $iotatName -type "string" "Wall"; }
select -r indigoDiffuseNode; //name of material node to be selected $indObjectToAddTo = `ls -sl`; $iotatRed = ( $indObjectToAddTo[0] + ".indDifRed" ); $iotatGreen = ( $indObjectToAddTo[0] + ".indDifGreen" ); $iotatBlue = ( $indObjectToAddTo[0] + ".indDifBlue" ); $iotatName = ( $indObjectToAddTo[0] + ".indDifName" ); //---------------------------------------- Set Initial Values setAttr $iotatRed 0.5; setAttr $iotatGreen 0.5; setAttr $iotatBlue 0.5; setAttr $iotatName -type "string" "Wall";
$indSetShaderNode = ( $indPolyObject[0] + "." + $indShaderNode ); $indSetGenNode = ( $indPolyObject[0] + "." + $indGenNode );
//-----------------MAYA TO INDIGO XML CONVERTER------------------ //Version: BETA 0.6 (0.6) synced! //--------------------------------------------- //Credits: //Matt B. (aka MattTheMan or ThatDude33) (converter engine and more) //Arne OOG (aka arneoog) (interface and more) //XML Output in Script Window and Auto Save //No edits should be neccesary //Start Writing: //-----------------OBJECT EDITOR------------------ global proc mtiObjectEditor() { window -title "Object Editor" -h 340 -w 570 objE00444; rowLayout -numberOfColumns 2 -columnWidth2 174 310; textScrollList -width 160 -height 306 -numberOfRows 8 -allowMultiSelection false -append "one" -append "two" -append "three" -append "four" -append "five" -append "six" -append "seven" -append "eight" -append "nine" -append "ten" -append "eleven" -append "twelve" -append "thirteen" -append "fourteen" -append "fifteen" -selectItem "six" -showIndexedItem 4; setParent ..; setParent ..; columnLayout; text -label "Material Settings" -w 400 -align "left" -font "boldLabelFont"; separator -h 10 -w 400; shelfLayout -width 390 -cellWidth 34 -cellHeight 34; shelfButton -annotation "Diffuse Shader" -image "mtiIcons/indigo_diffuce.bmp" -command "diffuce"; shelfButton -annotation "Phong Shader" -image "mtiIcons/indigo_phong.bmp" -command "phong"; shelfButton -annotation "Specular Shader" -image "mtiIcons/indigo_specular.bmp" -command "specular"; shelfButton -annotation "Mesh Light Shader" -image "mtiIcons/indigo_meshLight.bmp" -command "meshlight"; shelfButton -annotation "Metal Shader" -image "mtiIcons/indigo_metal.bmp" -command "metal"; setParent ..; rowLayout -numberOfColumns 2 -columnWidth2 170 230; text -label "Name Of Material Type" -w 170 -align "left"; textField -w 200; setParent ..; colorSliderGrp -h 25 -label "Diffuse" -rgb 0.5 0.5 0.5; colorSliderGrp -h 25 -label "Specular" -rgb 0 0 0; floatSliderGrp -h 25 -label "Exponent" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 0.001 -maxValue 10000 -value 10000; separator -h 10 -w 400; text -label "" -h 20 -align "left"; optionMenu -label "Add Existing Materials"; menuItem -label "?????"; text -label "" -align "left"; text -label "Object settings" -w 400 -align "left" -font "boldLabelFont"; separator -h 10 -w 400; checkBox -label "Normal Smoothing" -value 1; setParent ..; setParent ..; showWindow; }