
Maya To Indigo XML Converter v0.6 beta1 (0.6t6 & 0.6)
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
okay, I won't do very much for a while... Need a break from this, heh 
Want to do some other stuff too.. (like really get started on my new 3D short)
You have had your time off, now it's my turn
hihi
Good Luck!

Want to do some other stuff too.. (like really get started on my new 3D short)
You have had your time off, now it's my turn


Good Luck!
Arne OOG - My Portfolio
I've been working on this, and only this, for something like two monthes.. or more.. 
While Matt B has been too busy
So I need a two week break, an almost scripting free break that is
I think Matt B will be working on it though, so be happy
heh

While Matt B has been too busy

So I need a two week break, an almost scripting free break that is

I think Matt B will be working on it though, so be happy

Arne OOG - My Portfolio
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
Oh, that sounds ok to me ! I was affraid it could be months ! Telling to myself: "So I need a two week break


Anyone need a break sometimes

Me happy to read you want more, Dude !
I think we (Maya users) should go in more testing anyway, instead of just waiting for something. I need a break this w-e too (3d wise), I'll post some images in the coming week, sticking with simpler geos

Cheers !
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
here is the mtiObjectEditor- it works for diffuse and phong materials! 
http://www.sharebigfile.com/file/21997/ ... r.mel.html

http://www.sharebigfile.com/file/21997/ ... r.mel.html
Matt B. >>Maya To Indigo<<


- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
never mind... that hoster botched up my file
just open up the mtiObjectEditor.mel file in the script editor and copy-paste this over everything else



just open up the mtiObjectEditor.mel file in the script editor and copy-paste this over everything else

Code: Select all
//-----------------MAYA TO INDIGO XML CONVERTER------------------
//Version: BETA 0.6 (0.6)
//---------------------------------------------
//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;
rowLayout -numberOfColumns 2 -columnWidth2 174 310;
textScrollList -width 160 -height 500 -numberOfRows 8 -allowMultiSelection false -selectCommand "objSelect" TextBox;
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 "Material Name Appears Here" -w 200 -align "left" tName;
text -label "Material Type Appears Here" -w 200 -align "left" tType;
string $shapes[] = `ls -s`;
for ($one in $shapes){
if(`objectType $one` == "mesh"){
textScrollList -edit -append $one TextBox;
string $sg[] = `listConnections -t shadingEngine $one`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
if ($amat[2] == "lambert"){$amat[2] = "diffuse";}
text -edit -label $amat[2] tName;
}
}
setParent ..;
text -label "Diffuse Material Settings" -w 200 -align "left";
colorSliderGrp -h 25 -label "Diffuse" -rgb 0.5 0.5 0.5 -en 0 -cc "dDiffuseChange" -dc "dDiffuseChange" dDiffuse ;
separator -w 400 -h 10;
text -label "Phong Material Settings" -w 200 -align "left";
colorSliderGrp -h 25 -label "Diffuse" -rgb 0.5 0.5 0.5 -en 0 -cc "pDiffuseChange" -dc "pDiffuseChange" pDiffuse;
colorSliderGrp -h 25 -label "Specular" -rgb 0 0 0 -en 0 -cc "pSpecularChange" -dc "pSpecularChange" pSpecular;
floatSliderGrp -h 25 -label "Exponent" -field true
-fieldMinValue 20 -fieldMaxValue 10000
-minValue 20 -maxValue 50000 -value 10000 -en 0 -pre 0 -cc "pExponentChange" -dc "pExponentChange" pExponent;
separator -h 10 -w 400;
text -label "Specular Material Settings" -w 200 -align "left";
checkBox -label "Transparent" -align "left" -en 0 sTransparent;
floatSliderGrp -h 25 -label "Ior" -field true
-fieldMinValue 1 -fieldMaxValue 3.5
-minValue 1 -maxValue 3.5 -en 0 sIor;
floatSliderGrp -h 25 -label "Dispersion Coefficient" -field true
-fieldMinValue 0.000 -fieldMaxValue 0.1
-minValue 0.000 -maxValue 0.1 -en 0 sDispersion;
colorSliderGrp -h 25 -label "Absorbed Color" -rgb 0 0 0 -en 0 sAbsorbed;
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;
}
global proc objSelect (){
string $sel[] = `textScrollList //define an array for the selection
-query //put the command in query mode
-selectItem //get the string of the item the user selected
TextBox`; //naming controls makes this a snap
string $sg[] = `listConnections -t shadingEngine $sel[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
string $matType = `objectType $amat[2]`;
if ($matType == "lambert"){$matType = "diffuse";}
text //put the name of the selection in the field
-edit //put the command in edit mode
-label $amat[2] //text is what we're editing. $sel is that text
tName; //name of the text field
text -edit -label $matType tType;
if ($matType == "diffuse"){
colorSliderGrp -edit -enable 1 dDiffuse;
colorSliderGrp -edit -enable 0 pDiffuse;
colorSliderGrp -edit -enable 0 pSpecular;
floatSliderGrp -edit -enable 0 pExponent;
}
if ($matType == "phong"){
colorSliderGrp -edit -enable 0 dDiffuse;
colorSliderGrp -edit -enable 1 pDiffuse;
colorSliderGrp -edit -enable 1 pSpecular;
floatSliderGrp -edit -enable 1 pExponent;
}
}
global proc dDiffuseChange(){
float $dDrgb[] = `colorSliderGrp -query -rgb dDiffuse`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".color", $dDrgb[0], $dDrgb[1], $dDrgb[2]);
}
global proc pDiffuseChange(){
float $pDrgb[] = `colorSliderGrp -query -rgb pDiffuse`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".color", $pDrgb[0], $pDrgb[1], $pDrgb[2]);
}
global proc pSpecularChange(){
float $pSrgb[] = `colorSliderGrp -query -rgb pSpecular`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".reflectivity", 0);
setAttr($amat[2]+".specularColor", $pSrgb[0], $pSrgb[1], $pSrgb[2]);
}
global proc pExponentChange(){
float $exp = `floatSliderGrp -query -v pExponent`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".cosinePower", $exp/10);
}enderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
string $matType = `objectType $amat[2]`;
if ($matType == "lambert"){$matType = "diffuse";}
text //put the name of the selection in the field
-edit //put the command in edit mode
-label $amat[2] //text is what we're editing. $sel is that text
tName; //name of the text field
text -edit -label $matType tType;
if ($matType == "diffuse"){
colorSliderGrp -edit -enable 1 dDiffuse;
colorSliderGrp -edit -enable 0 pDiffuse;
colorSliderGrp -edit -enable 0 pSpecular;
floatSliderGrp -edit -enable 0 pExponent;
}
if ($matType == "phong"){
colorSliderGrp -edit -enable 0 dDiffuse;
colorSliderGrp -edit -enable 1 pDiffuse;
colorSliderGrp -edit -enable 1 pSpecular;
floatSliderGrp -edit -enable 1 pExponent;
}
}
global proc dDiffuseChange(){
float $dDrgb[] = `colorSliderGrp -query -rgb dDiffuse`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".color", $dDrgb[0], $dDrgb[1], $dDrgb[2]);
}
global proc pDiffuseChange(){
float $pDrgb[] = `colorSliderGrp -query -rgb pDiffuse`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".color", $pDrgb[0], $pDrgb[1], $pDrgb[2]);
}
global proc pSpecularChange(){
float $pSrgb[] = `colorSliderGrp -query -rgb pSpecular`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".reflectivity", 0);
setAttr($amat[2]+".specularColor", $pSrgb[0], $pSrgb[1], $pSrgb[2]);
}
global proc pExponentChange(){
float $exp = `floatSliderGrp -query -v pExponent`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".cosinePower", $exp/10);
}
Matt B. >>Maya To Indigo<<


- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
try this one (UPDATED with a handy feature
)

Code: Select all
//-----------------MAYA TO INDIGO XML CONVERTER------------------
//Version: BETA 0.6 (0.6)
//---------------------------------------------
//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;
rowLayout -numberOfColumns 2 -columnWidth2 174 310;
textScrollList -width 160 -height 500 -numberOfRows 8 -allowMultiSelection false -selectCommand "objSelect" TextBox;
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 "Material Name Appears Here" -w 200 -align "left" tName;
text -label "Material Type Appears Here" -w 200 -align "left" tType;
string $shapes[] = `ls -s`;
for ($one in $shapes){
if(`objectType $one` == "mesh"){
textScrollList -edit -append $one TextBox;
string $sg[] = `listConnections -t shadingEngine $one`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
if ($amat[2] == "lambert"){$amat[2] = "diffuse";}
text -edit -label $amat[2] tName;
}
}
setParent ..;
text -label "Diffuse Material Settings" -w 200 -align "left";
colorSliderGrp -h 25 -label "Diffuse" -rgb 0.5 0.5 0.5 -en 0 -cc "dDiffuseChange" -dc "dDiffuseChange" dDiffuse ;
separator -w 400 -h 10;
text -label "Phong Material Settings" -w 200 -align "left";
colorSliderGrp -h 25 -label "Diffuse" -rgb 0.5 0.5 0.5 -en 0 -cc "pDiffuseChange" -dc "pDiffuseChange" pDiffuse;
colorSliderGrp -h 25 -label "Specular" -rgb 0 0 0 -en 0 -cc "pSpecularChange" -dc "pSpecularChange" pSpecular;
floatSliderGrp -h 25 -label "Exponent" -field true
-fieldMinValue 20 -fieldMaxValue 10000
-minValue 20 -maxValue 50000 -value 10000 -en 0 -pre 0 -cc "pExponentChange" -dc "pExponentChange" pExponent;
separator -h 10 -w 400;
text -label "Specular Material Settings" -w 200 -align "left";
checkBox -label "Transparent" -align "left" -en 0 sTransparent;
floatSliderGrp -h 25 -label "Ior" -field true
-fieldMinValue 1 -fieldMaxValue 3.5
-minValue 1 -maxValue 3.5 -en 0 sIor;
floatSliderGrp -h 25 -label "Dispersion Coefficient" -field true
-fieldMinValue 0.000 -fieldMaxValue 0.1
-minValue 0.000 -maxValue 0.1 -en 0 sDispersion;
colorSliderGrp -h 25 -label "Absorbed Color" -rgb 0 0 0 -en 0 sAbsorbed;
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 -onc "onNormalSmoothing" -ofc "offNormalSmoothing" normalCb;
setParent ..;
setParent ..;
showWindow;
}
global proc objSelect (){
string $sel[] = `textScrollList //define an array for the selection
-query //put the command in query mode
-selectItem //get the string of the item the user selected
TextBox`; //naming controls makes this a snap
string $sg[] = `listConnections -t shadingEngine $sel[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
string $matType = `objectType $amat[2]`;
if ($matType == "lambert"){$matType = "diffuse";}
text //put the name of the selection in the field
-edit //put the command in edit mode
-label $amat[2] //text is what we're editing. $sel is that text
tName; //name of the text field
text -edit -label $matType tType;
if ($matType == "diffuse"){
getDiffuseSettings();
colorSliderGrp -edit -enable 1 dDiffuse;
colorSliderGrp -edit -enable 0 pDiffuse;
colorSliderGrp -edit -enable 0 pSpecular;
floatSliderGrp -edit -enable 0 pExponent;
}
if ($matType == "phong"){
getPhongSettings();
colorSliderGrp -edit -enable 0 dDiffuse;
colorSliderGrp -edit -enable 1 pDiffuse;
colorSliderGrp -edit -enable 1 pSpecular;
floatSliderGrp -edit -enable 1 pExponent;
}
}
global proc dDiffuseChange(){
float $dDrgb[] = `colorSliderGrp -query -rgb dDiffuse`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".color", $dDrgb[0], $dDrgb[1], $dDrgb[2]);
}
global proc pDiffuseChange(){
float $pDrgb[] = `colorSliderGrp -query -rgb pDiffuse`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".color", $pDrgb[0], $pDrgb[1], $pDrgb[2]);
}
global proc pSpecularChange(){
float $pSrgb[] = `colorSliderGrp -query -rgb pSpecular`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".reflectivity", 0);
setAttr($amat[2]+".specularColor", $pSrgb[0], $pSrgb[1], $pSrgb[2]);
}
global proc pExponentChange(){
float $exp = `floatSliderGrp -query -v pExponent`;
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".cosinePower", $exp/10);
}
global proc onNormalSmoothing(){
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".diffuse", 1.0);
}
global proc offNormalSmoothing(){
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
setAttr($amat[2]+".diffuse", 0);
}
global proc getDiffuseSettings(){
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
float $d[] = getAttr($amat[2]+".color");
colorSliderGrp -e -rgb $d[0] $d[1] $d[2] dDiffuse;
}
global proc getPhongSettings(){
string $obj[] = `textScrollList -query -selectItem TextBox`;
string $sg[] = `listConnections -t shadingEngine $obj[0]`;
if ($sg[0] == "initialShadingGroup"){
$sg[0] = "lambert1";
}
string $amat[] = `listConnections $sg[0]`;
if ($amat[2] == "renderPartition"){
$amat[2] = $amat[3];
}
if ($amat[2] == "defaultShaderList1"){
$amat[2] = "lambert1";
}
float $d[] = getAttr($amat[2]+".color");
colorSliderGrp -e -rgb $d[0] $d[1] $d[2] pDiffuse;
float $s[] = getAttr($amat[2]+".specularColor");
colorSliderGrp -e -rgb $s[0] $s[1] $s[2] pSpecular;
float $e = getAttr($amat[2]+".cosinePower");
$e = $e*10;
floatSliderGrp -e -v $e pExponent;
}
Matt B. >>Maya To Indigo<<


Cool 
Now to Blinn/Specular
hehe
Remember: Higher rgb_absorptivity = less transparent/harder color (duh)
EDIT: connect the normal smoothing to the objects Smooth Shading attribute!
The mtiGen.mel is now using that

Now to Blinn/Specular

Remember: Higher rgb_absorptivity = less transparent/harder color (duh)

EDIT: connect the normal smoothing to the objects Smooth Shading attribute!
The mtiGen.mel is now using that

Arne OOG - My Portfolio
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
wow ! didn't I tell I wanted a break too !?
Look, the exporter is stopping with a simple scene:
1 plane divided 2x2, triangualted with default Lambert1
Duplicated, copy moved up a bit, assigned new Lambert with Incandescence set to 0.5, reversed normals (so both objects have facing normals)
Deleted all history, created and placed camera. Hit generate. Hers comes the log:
I missed smthing I guess...

Look, the exporter is stopping with a simple scene:
1 plane divided 2x2, triangualted with default Lambert1
Duplicated, copy moved up a bit, assigned new Lambert with Incandescence set to 0.5, reversed normals (so both objects have facing normals)
Deleted all history, created and placed camera. Hit generate. Hers comes the log:
Code: Select all
envset1-null
lambert1
lightLinker1
initialMaterialInfo
lightLinker1
renderPartition
pPlane1
lightLinker1
materialInfo1
lightLinker1
renderPartition
lambert2
pPlane2
pPlaneShape1/:con lambert1
// Error: file: C:/Documents and Settings/Administrateur.ZNCT/Mes documents/maya/8.0/scripts/mtiGen.mel line 446: No object matches name: lightLinker1.incandescence //
Code: Select all
mtiObjectEditor;
diffuce;
// Error: line 1: Cannot find procedure "diffuce". //
phong;
// Error: line 1: Cannot find procedure "phong". //
specular;
// Error: line 1: Cannot find procedure "specular". //
meshlight;
// Error: line 1: Cannot find procedure "meshlight". //
metal;
// Error: line 1: Cannot find procedure "metal". //

Beware the spelling of "diffuse", don't make my english even worst

Who is online
Users browsing this forum: No registered users and 0 guests