Softimage Forum (Read Only)
Welcome to Autodesk’s Softimage Forums. Share your knowledge, ask questions, and explore popular Softimage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mel's evalDeferred

3 REPLIES 3
Reply
Message 1 of 4
wangr
538 Views, 3 Replies

mel's evalDeferred

isn't there any equivalent function/command in XSI SDK act as evalDeferred in Maya Mel? please...

thanks,
Ruiying
3 REPLIES 3
Message 2 of 4
hbahnassi
in reply to: wangr

If you are using Jscript in XSI, you can use:
eval("// Your Code as String")


If the script is in another file, you need to read it first then evaluate it in your script.

Here's an example:


var s_scriptFile = "C:\\ExternalScript.js";
var o_fso = new ActiveXObject("Scripting.FileSystemObject");
if (!o_fso.FileExists(s_scriptFile))
LogMessage(s_scriptFile + " File not found!", siError);
else
{
var o_file = o_fso.OpenTextFile(s_scriptFile, 1)
eval(o_file.ReadAll());
o_file.Close();
}
Homam
Message 3 of 4
wangr
in reply to: hbahnassi

Thank you Homamo!
Message 4 of 4
hbahnassi
in reply to: wangr

Or better solution:


Application.ExecuteScript( FileName, , , );


Reference:
http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/Model.Fin...
Homam

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report