arunvb
02-25-2009, 01:31 AM
I have a file translator plug-in which uses a mel script to display the options UI. I've registered the mel by passing the mel script name in plugin.registerFileTranslator("myplugin", "none", myplugin::creator, "myoptions.mel"). The UI works correctly.
And in myoptions.mel, the myoptions function is defined as follows :
global proc int myoptions( string $parent,
string $action,
string $settings,
string $callback )
{
if( $action == "post" )
{
... ...
}
else if ($action == "query")
{
... ...
// Pass the options to the callback functions so that plug-in can process it
eval( $callback + "\"" + $options + "\"" );
}
}
The script has the 4th parameter - $callback, which is the callback function to be called to process the user selected options. My question is where / how do I specify the name of the callback function to be called. When I print the name of the callback in my existing script, it shows as fo_optionsCallback. If I want the have my own function - say parseOptions - in my plug, how do I do that ? or if this isn't feasible, how do I write by own version of fo_optionsCallback and pass the options to my plugin ?
Thanks
Arun
And in myoptions.mel, the myoptions function is defined as follows :
global proc int myoptions( string $parent,
string $action,
string $settings,
string $callback )
{
if( $action == "post" )
{
... ...
}
else if ($action == "query")
{
... ...
// Pass the options to the callback functions so that plug-in can process it
eval( $callback + "\"" + $options + "\"" );
}
}
The script has the 4th parameter - $callback, which is the callback function to be called to process the user selected options. My question is where / how do I specify the name of the callback function to be called. When I print the name of the callback in my existing script, it shows as fo_optionsCallback. If I want the have my own function - say parseOptions - in my plug, how do I do that ? or if this isn't feasible, how do I write by own version of fo_optionsCallback and pass the options to my plugin ?
Thanks
Arun
