Maya To Indigo XML Converter v0.6 beta1 (0.6t6 & 0.6)
Maya To Indigo XML Converter v0.6 beta1 (0.6t6 & 0.6)
I desided to release the new, pretty much stable, version of the Maya Exporter!
Everyone can now use the Physical Sun Light! No more YZ problems!
There may come another version later on, depends on what Matt B have/can do
Download here: maya_to_indigo_v0.6_beta1.zip
Change Log (v0.6 beta1)
New Functions:
- Added some new settings for indigo v0.6
- Fixed the Y Z up axis translator!
- Fixed Normal error
- Fixed the System Settings
Not Working Functions:
- Object Editor
- Material Editor
- Render Scene from Maya (may work)
- Rectangle Light
- The Edit Menu
Help File (Read Me)
Enjoy!
Everyone can now use the Physical Sun Light! No more YZ problems!
There may come another version later on, depends on what Matt B have/can do
Download here: maya_to_indigo_v0.6_beta1.zip
Change Log (v0.6 beta1)
New Functions:
- Added some new settings for indigo v0.6
- Fixed the Y Z up axis translator!
- Fixed Normal error
- Fixed the System Settings
Not Working Functions:
- Object Editor
- Material Editor
- Render Scene from Maya (may work)
- Rectangle Light
- The Edit Menu
Help File (Read Me)
Enjoy!
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
here's the mtiGen file with added support for normal smoothing per objcet
http://www.filefactory.com/file/d087d6/
it's the diffuse slider in the phong/lambert tab. 0 = smoothing off, >0 = smoothing on
http://www.filefactory.com/file/d087d6/
it's the diffuse slider in the phong/lambert tab. 0 = smoothing off, >0 = smoothing on
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:
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
This is the Object Editor code that loads up each of the models into the text box
[/color]
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 306 -numberOfRows 8 -allowMultiSelection false TextBox;
string $shapes[] = `ls -s`;
for ($one in $shapes){
if(`objectType $one` == "mesh"){
textScrollList -edit -append $one 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 "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;
}
Last edited by ThatDude33 on Fri Nov 17, 2006 12:20 am, edited 1 time in total.
Matt B. >>Maya To Indigo<<
Nice to see that hot bread, mtiObjectEditor.mel edited !
I'm new here, answering ThatDude's call on CGTalk. Haven't get my test scene pass through the exporter, but that was before I read the reference
I'm very excited regarding Indigo, and yes, I'm aware rendering takes time. That's ok to me, the way an *unbiased* renderer should be !
Sorry if that wasn't the place to post.
Yay !
btw Dude you forgot to print the last }
I'm new here, answering ThatDude's call on CGTalk. Haven't get my test scene pass through the exporter, but that was before I read the reference
I'm very excited regarding Indigo, and yes, I'm aware rendering takes time. That's ok to me, the way an *unbiased* renderer should be !
Sorry if that wasn't the place to post.
Yay !
btw Dude you forgot to print the last }
I downloaded and used your cool script tonight. Thanks. I also thought it might help to add a little code to automate the triangulation and deleting history process. Keep in mind I just through this code together quickly. Maybe you guys have already thought of this and did not implement it for a good reason. But anyways here is the code:
//--------------------------------------------------------
SelectAll;
DeleteHistory;
SelectAllPolygonGeometry;
string $triangulateMe[] = `ls-sl`;
string $objectToTriangulate;
for ($objectToTriangulate in $triangulateMe) {
polyTriangulate $objectToTriangulate;
}
DeleteHistory;
//--------------------------------------------------------
I would add it to when you generate the XML code, that way you can keep your Maya scenes nice and editable (quads rule). However this does not allow you to add the light shaders last.
Hope it helps.
//--------------------------------------------------------
SelectAll;
DeleteHistory;
SelectAllPolygonGeometry;
string $triangulateMe[] = `ls-sl`;
string $objectToTriangulate;
for ($objectToTriangulate in $triangulateMe) {
polyTriangulate $objectToTriangulate;
}
DeleteHistory;
//--------------------------------------------------------
I would add it to when you generate the XML code, that way you can keep your Maya scenes nice and editable (quads rule). However this does not allow you to add the light shaders last.
Hope it helps.
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
nice to see some new Maya users here!
@CTZn oh whoops my bad
There's options already inside of the Maya->Indigo window, I don't want to automate it because sometimes you aren't ready for all history to be deleted. *shrugs*. oh well.
@CTZn oh whoops my bad
tripnfall wrote:I downloaded and used your cool script tonight. Thanks. I also thought it might help to add a little code to automate the triangulation and deleting history process. Keep in mind I just through this code together quickly. Maybe you guys have already thought of this and did not implement it for a good reason. But anyways here is the code:
//--------------------------------------------------------
SelectAll;
DeleteHistory;
SelectAllPolygonGeometry;
string $triangulateMe[] = `ls-sl`;
string $objectToTriangulate;
for ($objectToTriangulate in $triangulateMe) {
polyTriangulate $objectToTriangulate;
}
DeleteHistory;
//--------------------------------------------------------
I would add it to when you generate the XML code, that way you can keep your Maya scenes nice and editable (quads rule). However this does not allow you to add the light shaders last.
Hope it helps.
There's options already inside of the Maya->Indigo window, I don't want to automate it because sometimes you aren't ready for all history to be deleted. *shrugs*. oh well.
Matt B. >>Maya To Indigo<<
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
updated object editor
just replace the mtiObjectEditor.mel file with the stuff in the box below
not functional as of yet, but it will work soon!!!!!!!!!!!!!!!!!!!!!!!!
just replace the mtiObjectEditor.mel file with the stuff in the box below
not functional as of yet, but it will work soon!!!!!!!!!!!!!!!!!!!!!!!!
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;
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;
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 "Specular Material Settings" -w 200 -align "left";
checkBox -label "Transparent" -align "left";
floatSliderGrp -h 25 -label "Ior" -field true
-fieldMinValue 1 -fieldMaxValue 3.5
-minValue 1 -maxValue 3.5;
floatSliderGrp -h 25 -label "Dispersion Coefficient" -field true
-fieldMinValue 0.000 -fieldMaxValue 0.1
-minValue 0.000 -maxValue 0.1;
colorSliderGrp -h 25 -label "Absorbed Color" -rgb 0 0 0;
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;
}
Matt B. >>Maya To Indigo<<
- ThatDude33
- Posts: 216
- Joined: Wed Jul 05, 2006 1:26 pm
- Contact:
ok, this is an updated version. when you select somethign, the repsective set of material editor things enable. It's quite beautiful to witness
arne- you cna build off of this
arne- you cna build off of this
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 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 pDiffuse;
colorSliderGrp -h 25 -label "Specular" -rgb 0 0 0 -en 0 pSpecular;
floatSliderGrp -h 25 -label "Exponent" -field true
-fieldMinValue -10000 -fieldMaxValue 10000
-minValue 0.001 -maxValue 10000 -value 10000 -en 0 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;
}
}
Matt B. >>Maya To Indigo<<
Who is online
Users browsing this forum: No registered users and 38 guests