Maya To Indigo XML Converter v0.6 beta1 (0.6t6 & 0.6)

Announcements, requests and support regarding the MAYA exporter
User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Location: Norway
Contact:

Maya To Indigo XML Converter v0.6 beta1 (0.6t6 & 0.6)

Post by arneoog » Sat Nov 11, 2006 7:32 am

I desided to release the new, pretty much stable, version of the Maya Exporter! 8)
Everyone can now use the Physical Sun Light! No more YZ problems! :D
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! :D
Arne OOG - My Portfolio

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Sun Nov 12, 2006 2:30 am

cool cool cool! I've been gone for a lilttle while, but that looks cool 8)
Matt B. >>Maya To Indigo<<
Image

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Location: Norway
Contact:

Post by arneoog » Sun Nov 12, 2006 2:38 am

Welcome Back! :D
As I said, If you got anything you want to add, just send it! :)
(That's why I called it v0.6 beta1)
Arne OOG - My Portfolio

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Wed Nov 15, 2006 9:35 am

here's the mtiGen file with added support for normal smoothing per objcet 8)

http://www.filefactory.com/file/d087d6/

it's the diffuse slider in the phong/lambert tab. 0 = smoothing off, >0 = smoothing on :D
Matt B. >>Maya To Indigo<<
Image

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Location: Norway
Contact:

Post by arneoog » Wed Nov 15, 2006 9:41 am

Awsome 8)
*put in v0.6 beta2 folder*
Arne OOG - My Portfolio

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Wed Nov 15, 2006 10:20 am

i have an idea. if you can make this UI, I'll tie it in when I get the chance (with text files for the various settings and what not :twisted: )

Image
Matt B. >>Maya To Indigo<<
Image

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Location: Norway
Contact:

Post by arneoog » Wed Nov 15, 2006 10:28 am

Yepp, I will make that :D
I'll save the info as Extra Attributes in the objects 8)
(auto create, save & get)

Probably start tomorrow :)
Arne OOG - My Portfolio

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Thu Nov 16, 2006 9:54 am

edit- NICE! i see the object editor! now to make it WORK!
Matt B. >>Maya To Indigo<<
Image

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Thu Nov 16, 2006 1:29 pm

This is the Object Editor code that loads up each of the models into the text box 8)

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;
}
[/color]
Last edited by ThatDude33 on Fri Nov 17, 2006 12:20 am, edited 1 time in total.
Matt B. >>Maya To Indigo<<
Image

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Thu Nov 16, 2006 4:54 pm

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 :wink:

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 } :wink:

tripnfall
Posts: 6
Joined: Thu Nov 16, 2006 10:12 pm

Post by tripnfall » Thu Nov 16, 2006 10:35 pm

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.

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Fri Nov 17, 2006 12:20 am

nice to see some new Maya users here! 8)

@CTZn oh whoops :oops: 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<<
Image

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Fri Nov 17, 2006 2:34 pm

updated object editor 8)
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<<
Image

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Fri Nov 17, 2006 3:02 pm

ok, this is an updated version. when you select somethign, the repsective set of material editor things enable. It's quite beautiful to witness :D

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<<
Image

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Location: Norway
Contact:

Post by arneoog » Sat Nov 18, 2006 3:41 am

cool 8)
I am working on the UI :)
Do you want the material settings to pop up in a window or inside the OE?

(Object Editor)
Arne OOG - My Portfolio

Post Reply
66 posts

Who is online

Users browsing this forum: No registered users and 0 guests