Some limits of CE Version (about oExporter)

isaachung2

22-11-2007 07:13:20

Hello

I try to use max script to add animations in oFusion scene exporter.

i = oExporter.addAnimation "test"
oExporter.setAnimProperties i "FrameStart" 0
oExporter.setAnimProperties i "FrameEnd" 100


but when I execute the code, it return:

1
false
false


in Max Script Listener

I use CE version.

If I need control export data by max script.
(ex: automatically add some animations,then set start frame and end frame)
How should I do?
Is it about the limits of CE version?

Thanks~

Lioric

23-11-2007 03:12:59

The Batch interface is enabled in the CE version, your script should work correctly

I will review this asap

Lioric

28-11-2007 16:11:09

I have reviewed your script and its working correctly, it produces:


i = oExporter.addAnimation "test"
oExporter.setAnimProperties i "FrameStart" 0
oExporter.setAnimProperties i "FrameEnd" 100


1
true
true


I will review with the CE version asap

Gormio

03-12-2007 14:35:42

I will review with the CE version asap

Something similiar is happening with the Pro version as well. Although not maybe exactly this same problem the animation adding has some non-functionality.

When trying to add animations with a script it works seemingly ok but nothing appears in the export dialog. Also when rerunning the script (trying to add the animations a second time) the indexes of the inserted animations just keep growing but still no animations in the export dialog.

Lioric

03-12-2007 15:13:38

That is the default behavior, when you add animations via batch interface, you add them to a different instance of export properties from the export dialog

That way you dont change the list that you have manually defined in the export dialog

I will add this to the list, to define a new parameter in the batch interface to add the animations (or edit them) directly to the export dialog

Expect this to be available over the next week

Gormio

03-12-2007 15:59:17

That is the default behavior, when you add animations via batch interface, you add them to a different instance of export properties from the export dialog

I see. So those animations would be thereof only editable through the script interface? And another set of animations might be in the export dialog? How I then define what set of animations is exported?

That way you dont change the list that you have manually defined in the export dialog

Sometimes my script has produced the animations to appear in the export dialog. And this is also what I was trying to do. However I can't say why they sometime appear there and sometimes don't.

I will add this to the list, to define a new parameter in the batch interface to add the animations (or edit them) directly to the export dialog

Expect this to be available over the next week


That sounds good.


Side note: I might explain what I'm trying to use this for. The max scenes aren't done by me. They are sent to me and I'm the one who exports the scenes to Ogre compatible form. Whenever I receive a new/corrected scene the animations are gone. So I have written the animation definitions (names and times) to a text file. Then with a help of a script I import those animations to the new scene so I don't have to input them manually every time a new scene arrives.

Lioric

03-12-2007 18:43:53

If you are exporting via the Export Dialog you will export the animations that are defiend in the list

If you are exporting via the batch interface, you will export either of them as needed:

/* Expor the Scene to the 'exportfilePath' file*/
oExporter.saveScene exportfilePath selected useCustomProps showDialog

If you define 1 for the "UseCustomProps" then you will be using the custom defined properties (with setGlobalProperties and setAnimProperties methods), if 0 is defined then the export properties previously defined in the export dialog will be used

Gormio

04-12-2007 10:33:11

If you are exporting via the Export Dialog you will export the animations that are defiend in the list

If you are exporting via the batch interface, you will export either of them as needed:

/* Expor the Scene to the 'exportfilePath' file*/
oExporter.saveScene exportfilePath selected useCustomProps showDialog

If you define 1 for the "UseCustomProps" then you will be using the custom defined properties (with setGlobalProperties and setAnimProperties methods), if 0 is defined then the export properties previously defined in the export dialog will be used


Ok, now I'm starting to get this :)

If I set showDialog to be 1 what properties are used then? By my experiments I would say that the ones in the export dialog but am I correct?

Now I have succesfully imported the animations to my scene - multiple times. How do I remove animations from the custom properties? I couldn't find any other useful functions besides addAnimation in the exporter interface :( I would like to see removeAnimation and numAnimations or something.

Lioric

04-12-2007 15:26:09

When showDialog is set to 1, it will use the properties defined in the Export Dialog

I will add this to the list, to use the customProps in the export dialog when used both values (useCustomProps and showDialog)

To clear the animation list (and set all other props to its defaults) you can use the:

// Restores the default values of the export global properties
// Disables all export types
// LogLevel: 2
// Using defult scene format

oExporter.setGlobalProps "SetDefaults"

You must enable the types that will be exported after this

The methods you need to handle animations will be available next week