Hi Chipp,
> Is it possible to do all this in one script?
It should be theoretically possible, but MoI is not currently oriented around creating procedural geometry by script like that, so there are various difficulties involved not the least of which is a lack of documentation on how to do scripts. In the future at some point I do expect to work on making MoI more friendly for doing stuff like that, but for now the learning curve is high enough that you will save a lot of time just doing those steps directly in the regular way.
> IOW, can one write a program which generates unique MoI model scripts
> which then can be executed in MoI to generate finished models?
It's theoretically possible, basically the same comment from above applies.
> Also, is there a plugin with a getfile requestor which can run external scripts?
I don't remember any existing plug-in like that, but you can prompt for a file name using:
var filename = moi.filesystem.getOpenFileName( 'Choose a script file', '*.js;Script files' );
if ( filename = '' )
return; // user canceled dialog
Then it should be possible to open the file and read its contents in using moi.filesystem.openFileStream - you can see how it's used in some of the CustomUI mechanisms.
Then once you have read it in, there is a JavaScript function eval() that can execute script from a string.
- Michael
|