[SOLVED] Load object via Jscript - how?
Posted: 03 Jul 2014, 04:11
From THIS thread
Just revisiting this. As.. I need to delete and load whole light systems for my pass management.
Question: How can I load an object via Jscript to import an *.rsobj?
I tried the code below, which will delete, but then it won't load. Any pointers?
trueBlue wrote:Here is an example button that loads an RsObj from a Library.
This assumes that the object and path exist and is correct. Note: I went by your screen capture.Code: Select all
RsFileIO.LoadObject(System.GetMainDir() + '\\Rs Main Libraries\\O. Tools\\tS761 Bevel - Extrude.RsObj', Space.CurrentScene())
Just revisiting this. As.. I need to delete and load whole light systems for my pass management.
Question: How can I load an object via Jscript to import an *.rsobj?
I tried the code below, which will delete, but then it won't load. Any pointers?
Code: Select all
function Execute(params)
{
Node.Delete(Space.CurrentScene() + "/Sky")
RsFileIO.LoadObject(System.GetMainDir() + "\\Colombian Personal Meme\\Obj - Sky\\Sky.RsObj", Space.CurrentScene())
}