Public Member Functions | |
| HRESULT | SaveObject ([in] BSTR bszFileName,[in] BSTR bszObjName) |
| HRESULT | LoadObject ([in] BSTR bszFileName,[in] BSTR bszOwnerName,[out, retval] BSTR *pVal) |
|
||||||||||||
|
Save object to the file. The whole subgraph will be saved if the object contains subobjects.
// save object MyCube from Space 3D to the file myObject.RsObj RsFileIO.SaveObject('c:\\myObject.RsObj', 'Project/Space 3D/MyCube') // save the selected object to the file mySelectdObject.RsObj RsFileIO.SaveObject('c:\\mySelectedObject.RsObj', '') |
|
||||||||||||||||
|
Load object from the file and add it to graph including its subgraph.
// load object from the file 'myObject.RsObj' and add it to the current scene RsFileIO.LoadObject('c:\\myObject.RsObj', Space.CurrentScene()) // load object from the file 'mySelectedObject.RsObj',add it to space 3D object and store name of loaded object in szLoadedObj variable szLoadedObj = RsFileIO.LoadObject('c:\\mySelectedObject.RsObj', 'Project/Space 3D/') |
1.3.2