Bug in the 3dsmax MAXscript exporter [solved]

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Bug in the 3dsmax MAXscript exporter [solved]

Post by Oogst »

I think I found an actual bug in the MAXscript-exporter for 3D Studio MAX. If a name of an object to be exported contains a '.' or a '-', the exporter crashes on this line in the file "ogreToolbar.mcr":

Code: Select all

m = execute ("$" + (replaceSpaces editObject.text));
The cause seems quite simple: execute uses the string it is given as a line of program-code, so for instance the object-name "piet-jan" would give this string to evaluate as a line of code:

Code: Select all

$piet-jan
Now MAXscript wonders how it can subtract two strings. I think the solution for this is very simple to implement, so I could take a look and fix this. First however, I would like to know whether this is really a bug or whether I am stupid (again) and overlooking something.

If it is a bug, where can I find the procedure for commiting fixes and would I be allowed to give the material-exporter and overhaul as well, while fixing this?

I know that a new exporter is in development, but the MAXscript-exporter is still the standard at the moment, right?
Last edited by Oogst on Tue Mar 21, 2006 4:31 pm, edited 1 time in total.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Please send any fixes to the patch list (Click 'Developers' on the main site)
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Post by Oogst »

I tried to create a patch, but it seems the same problem is in a lot of places of the script. I found 18 other lines similar to this one. Would it be a good idea to replace all of them with something like this?

Code: Select all

m = getNodeByName editObject.text;
Oogst
OGRE Expert User
OGRE Expert User
Posts: 1067
Joined: Mon Mar 29, 2004 8:49 pm
Location: the Netherlands
x 43
Contact:

Post by Oogst »

OK, I commited a patch. :)
Post Reply