Creating Maya 7 and MAX 8 Converters

Hi,
i just modified the ‘makepanda.py’ so that it complies the Maya 7 exporter and the Max 8 exporter (last one untested till now) under Windows.

Followin is the diff file that you can apply with the patch command. To do this in Windows you will need MSYS or cygwin.

To apply the patch:

  • paste the following code in a file and save it as ‘makepanda.diff’
  • put it in the same directory as the ‘makepanda.py’.
39c39
<           "OPENSSL","FREETYPE","FFTW","MILES","MAYA5","MAYA6","MAYA65","MAX5","MAX6","MAX7",
---
>           "OPENSSL","FREETYPE","FFTW","MILES","MAYA5","MAYA6","MAYA65","MAYA7","MAX5","MAX6","MAX7","MAX8",
243a244
>     MAX8      3D Studio Max version 8
246a248,249
>     MAYA65    Maya version 6.5
>     MAYA7     Maya version 7
438a442
>     MAXSDKCS["MAX8"] = "sdks/maxsdk8"
441a446
>     MAXSDK["MAX8"]   = "sdks/maxsdk8"
444a450
>     MAYASDK["MAYA7"] = "sdks/maya7"
477c483,484
<               ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath")
---
>               ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath"),
>               ("MAYA7", "SOFTWARE\\Alias|Wavefront\\Maya\\7.0\\Setup\\InstallPath")
503c510,511
<                ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0",            "Installdir",    "maxsdk\\include\\CS")]
---
>                ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0",            "Installdir",    "maxsdk\\include\\CS"),
>                ("MAX8", "SOFTWARE\\Autodesk\\3DSMAX\\8.0",            "Installdir",    "maxsdk\\include\\CS")]
970c978
<     for ver in ["MAYA5","MAYA6","MAYA65"]:
---
>     for ver in ["MAYA5","MAYA6","MAYA65","MAYA7"]:
972c980
<     for max in ["MAX5","MAX6","MAX7"]:
---
>     for max in ["MAX5","MAX6","MAX7","MAX8"]:
1143c1151
<         for ver in ["MAYA5","MAYA6","MAYA65"]:
---
>         for ver in ["MAYA5","MAYA6","MAYA65","MAYA7"]:
1173c1181
<         for ver in ["MAYA5","MAYA6","MAYA65"]:
---
>         for ver in ["MAYA5","MAYA6","MAYA65","MAYA7"]:
1360c1368
<     for maya in ["MAYA5","MAYA6","MAYA65"]:
---
>     for maya in ["MAYA5","MAYA6","MAYA65","MAYA7"]:
1366c1374
<     for max in ["MAX5","MAX6","MAX7"]:
---
>     for max in ["MAX5","MAX6","MAX7","MAX8"]:
3838c3846
< for VER in ["5","6","65"]:
---
> for VER in ["5","6","65","7"]:
3850c3858
< for VER in ["5","6","65"]:
---
> for VER in ["5","6","65","7"]:
3863c3871
< for VER in ["6", "7"]:
---
> for VER in ["6", "7", "8"]:
3890c3898
< for VER in ["6", "7"]:
---
> for VER in ["6", "7", "8"]:
4017c4025
< for VER in ["5","6","65"]:
---
> for VER in ["5","6","65","7"]:

Then open a command window and enter the following command:


patch -n -i makepanda.diff makepanda.py

When you done all this compile all this as always.
If Maya 7 or Max 8 (incl. SDK) are installed then the exporter will be build.

I hope that help some of you.

Cheers

Vendolis

EDIT: This all applys to Panda 1.1.0 under Windows

Now, if someone could do this for 3ds max 8, that would be nice!! :wink:

This is also for 3ds max 8 … as its said in the subject.

Ah, must have missed that. Thanks!!

I am having problems finding out how to use the command:

patch -n -i makepanda.diff makepanda.py

What program uses this command? I have tried using it through the file apply_patch and build_patch. None of them work.

In other words, I have cygwin (MSYS doesnt work) and the makepanda.diff. What do I do from there to make makepanda a .py?

The program that i used was patch.exe of the msys package.

I opened a commandline in the folder where the makepanda.py is… and have the makepanda.diff copyed to this directory too… then i do the call. (I have the c:\msys\bin in my path)

If you do not have it in your path enviroment, you will need to call:

[path-to msys\bin]\patch.exe -n -i makepanda.diff makepanda.py

This just changes the makepanda.diff to the way it should look.

If nothing else works, open your makepanda.py and do the diff by hand.

39c39: Change line 39 in the original file to the new line

243a244: Add this line at the original after line 243, so it will be line 244

246a248,249: Add the two lines after the line 246 in the original file, they will be lines 248 and 249 in the new file…

all in all …

‘c’ stands for Line changed, replace it with the new line
‘a’ Lines where added.

hope that helps. normaly you should use the patch command and be ok. Make shure you use it on the original 1.1.0 file.

Cheers Vendolis

Oh no! :open_mouth: I don’t have makepanda.py!!! Was this included with the Panda 1.1.0 installation package?

Either way, can anyone tell me a way to get makepanda or link the file somehow?

This patch does !!! NOT !!! work for the binary installation version (MSI-Installer).
This is only for the source package. You will need to compile the whole Panda3D to get it.

I dont realy know what you need for it, for my PC is a development PC with a lot of Tools and SDKs installed. I have MS Visual Studio .NET 2003 (Ver. 7.1) and needed to install the DirectX 9c SDK (Release Oct 2005) to do the compile. In addition you need Maya 7 to be installed and/or The 3D Studio MAX 8 SDK installed (not in the normal install included).

Then you can do the compilation. For further info search the source compilation forum.