- Mon Sep 17, 2007 10:44 pm
#243639
I having some trouble upgrading to the 1.5 Maxwell plug-in.
With 1.1, it was possible to automatically export an MXS file by issuing the MAXScript command,
Now, with 1.5, the opposite is true:
What I really need is a command that specifies everything in MAXScript, so that it can be properly automated without any user interaction. Maxwell's DLR could export this command directly:
If not, it is extremely easy to add. Off the top of my head, you'd just add this code to your DLR:
- Casey
With 1.1, it was possible to automatically export an MXS file by issuing the MAXScript command,
Code: Select all
unfortunately it was not possible to control the name of the file, since it was set via the UI and could not be set by MAXScript (as far as I could tell).max quick render;
Now, with 1.5, the opposite is true:
Code: Select all
I can set the name of the file, but even with the #noPrompt option, the file does not export automatically. Instead it produces a dialog box that requires the user to select a camera and choose whether or not they wish to export an animation range.exportFile "h:/cmaxd/job.mxs" #noPrompt;
What I really need is a command that specifies everything in MAXScript, so that it can be properly automated without any user interaction. Maxwell's DLR could export this command directly:
Code: Select all
Does something like this exist in the plug-in?maxwellExportMXS outputName:"h:/cmaxd/job.mxs" camera:$SomeCamera;
If not, it is extremely easy to add. Off the top of my head, you'd just add this code to your DLR:
Code: Select all
and insert a call to your actual export path in where my // is.def_visible_primitive(maxwellExportMXS, "maxwellExportMXS");
Value *
maxwellExportMXS_cf(Value **ArgumentList, int ArgumentCount)
{
Value *Result = &false_value;
INode *CameraNode = 0;
char *OutputName = 0;
Value *Arg = _get_key_arg(ArgumentList, ArgumentCount, Name::intern("camera"));
if(Arg && (Arg != &unsupplied))
{
CameraNode = Arg->to_node();
}
Arg = _get_key_arg(ArgumentList, ArgumentCount, Name::intern("outputName"));
if(Arg && (Arg != &unsupplied))
{
OutputName = Arg->to_string();
}
if(CameraNode && OutputName)
{
//
// ... actual Maxwell internal export routines get called here
//
Result = &true_value;
}
return(Result);
}
- Casey