PDA

View Full Version : Using plugin for batch import/export



ppGiroux
11-18-2003, 09:12 AM
Good evening to all,

I am working on a plugin that imports/exports .fbx files into
Lightwave. What I want to do now is to call the import/export
functions of the plugin by any way ( LScript I guess) in order to
make batch renders of the fbx files in Lightwave.

My question is is it possible to call a plugin (.p) from a script
(or command line ?!?) with all the needed paramameters ?

Ultimatly I want to run LW from command line and by specifiying a
script to run on startup, which will call the plugin for as many
files as i specified in the script.

I know that in Maya what I had to do was to register a MEL command
so that whenver i typed ImportFBX in the interpreter would call the
same fbx imported plugin (with no UI).

thanks for you help.

pp

faulknermano
11-18-2003, 09:38 AM
try cmdseq().

regarding being able to feed parameters into it: well, that would depend on the plugin. some plugins allow to externally fed via commandline, but some only allow through their own interface.

ppGiroux
11-19-2003, 04:40 AM
I believe that my plugin is a LayoutGeneric plugin and not a command sequence ...

May that be the reason why it is not working ?

fxnut
11-19-2003, 06:52 AM
Originally posted by faulknermano
some plugins allow to externally fed via commandline

Do you have any more information on this Faulknermano? So far I've not come across any way of passing command line parameters into the .p plugins. Is it a particular class of plugin?

ppGiroux
11-19-2003, 07:01 AM
Also to note that CMDSEQ if for Modeler and not Layout.

Am I right ?


pp

faulknermano
11-20-2003, 05:38 AM
Originally posted by ppGiroux
I believe that my plugin is a LayoutGeneric plugin and not a command sequence ...

May that be the reason why it is not working ?

i see.

try:



CommandInput("Generic_MyPluing");


but first you should try to output a command list (refer to your lightwave docs). there you will find all the registered plugins. i seriously doubt however if CommandInput for generic plugins will allow parameter input.

faulknermano
11-20-2003, 05:43 AM
Originally posted by fxnut
Do you have any more information on this Faulknermano? So far I've not come across any way of passing command line parameters into the .p plugins. Is it a particular class of plugin?


in my experience it only works with modeler plugs. but hold on -> when i mean "command line" i mean using lscript's cmdseq() func to run it. honestly, i cannot think of a plug right now that does it.. oh wait! yes, the OBJ exporter.. if i am not mistaken. i think you can feed a filename, or something like that.

(i cant check this, unfortunately)

ppGiroux
11-20-2003, 05:56 AM
wow.

thanks a whole lot.