Is it possible to assign a custom tag script to an object via script? Point to a specific .js file which is a tag script and attach it to an object, but via scripting?
Thanks a ton in advance
-Chris G
scripttag = object.addTagOfType(SCRIPTTAG);
var prepath = doc.scriptPath().match(/(\/Users\/[-\w^&'@{}[\],$=!#().%+~ ]*\/)/g);
var file = new File(prepath + "Library/Application Support/Cheetah3D/Scripts/Library/" + "foobar.js");
scripttag.setParameter(“scriptName", file);
Yes.
Assume you have the object already, you would do the following:
I’m not exactly sure I completely understand how to use scripts on objects, but I DO know how to add tags!Code:scripttag = object.addTagOfType(SCRIPTTAG); var prepath = doc.scriptPath().match(/(\/Users\/[-\w^&'@{}[\],$=!#().%+~ ]*\/)/g); var file = new File(prepath + "Library/Application Support/Cheetah3D/Scripts/Library/" + "foobar.js"); scripttag.setParameter(“scriptName", file);