Public Member Functions | |
| HRESULT | OpenLibraryPlace ([in] BSTR szContainerNodePath,[in] BSTR szLibraryPlacePath,[in] BSTR szNodeName) |
| HRESULT | ShowStandardLibraryWindow ([in] BSTR szLibraryPlaceNodePath) |
| HRESULT | ShowLibraryBrowserWindow () |
| HRESULT | CreateMainLibrary ([in] BSTR bszMainLibraryPath) |
| HRESULT | AddLibraryWindowIntoTools ([in] BSTR szLibraryPlaceNodePath) |
| HRESULT | AddComponentsToLibPlace ([in] BSTR szLibraryPlacePath) |
| HRESULT | DlgGenericLoad ([in] VARIANT szFileName,[in] VARIANT szTargetName,[in] VARIANT dwFlags,[out, retval] VARIANT *pvObject) |
| HRESULT | DlgGenericSave ([in] VARIANT szFileName,[in] VARIANT szTargetName,[in] VARIANT dwFlags) |
| HRESULT | DlgSaveScene ([in] BSTR bszFileName) |
| HRESULT | Generate3DThumbnail ([in] BSTR bszObject,[in] RtDWORD dwWidth,[in] RtDWORD dwHeight,[out, retval] VARIANT *pvRdBitmap) |
| HRESULT | GenerateSceneThumbnail ([in] RtBOOL bWholeScrn,[in] RtDWORD dwWidth,[in] RtDWORD dwHeight,[out, retval] VARIANT *pvRdBitmap) |
| HRESULT | GetObjThumbnail ([in] BSTR bszObject,[out, retval] VARIANT *pvRdBitmap) |
| HRESULT IRiLibrary2::OpenLibraryPlace | ( | [in] BSTR | szContainerNodePath, | |
| [in] BSTR | szLibraryPlacePath, | |||
| [in] BSTR | szNodeName | |||
| ) |
Open/Create library place.
| szContainerNodePath | [in] Specify place in Dependency Graph in which should be the place node is created.
| |
| szLibraryPlacePath | [in] Specify the library place directory. | |
| szNodeName | [in] Name of the libraries place object. |
var nodePath = '/Libraries'; var libPath = System.GetMainDir() + '\\Rs Main Library Place'; var nodeName = 'Main Library Place'; Library2.OpenLibraryPlace(nodePath, libPath, nodeName);
| HRESULT IRiLibrary2::ShowStandardLibraryWindow | ( | [in] BSTR | szLibraryPlaceNodePath | ) |
Call to open a standard library window in default position (usually in Stack View).
| szLibraryPlaceNodePath | [in] Specify the library path.
|
Library2.ShowStandardLibraryWindow('Libraries/Main Library Place:Activity - Simulation');
| HRESULT IRiLibrary2::ShowLibraryBrowserWindow | ( | ) |
Opens the standard Library Browser window.
Library2.ShowLibraryBrowserWindow();
| HRESULT IRiLibrary2::CreateMainLibrary | ( | [in] BSTR | bszMainLibraryPath | ) |
Create main library space object if it doesn't already exist.
| bszMainLibraryPath | [in] Specify the root directory for the library place. |
var mDir = System.GetMainDir();
var libMainDir = mDir + '\\Rs Main Libraries';
Library2.CreateMainLibrary(libMainDir);
| HRESULT IRiLibrary2::AddLibraryWindowIntoTools | ( | [in] BSTR | szLibraryPlaceNodePath | ) |
Call to open a standard library window as non-docked window.
| szLibraryPlaceNodePath | [in] Specify the library path.
|
Library2.AddLibraryWindowIntoTools('Libraries/Main Library Place:Activity - Simulation');
| HRESULT IRiLibrary2::AddComponentsToLibPlace | ( | [in] BSTR | szLibraryPlacePath | ) |
Method enumerate all your packages and save all the objects into specified location.
| szLibraryPlacePath | [in] Library Place (full filepath) where to save the objects.
// You will be asked for the location where to save the objects. Library2.AddComponentsToLibPlace(''); // Save the objects into root \myTestRoot directory. var root = System.GetMainDir(); Library2.AddComponentsToLibPlace(root + '\\myTestRoot'); |
| HRESULT IRiLibrary2::DlgGenericLoad | ( | [in] VARIANT | szFileName, | |
| [in] VARIANT | szTargetName, | |||
| [in] VARIANT | dwFlags, | |||
| [out, retval] VARIANT * | pvObject | |||
| ) |
Function loads any known Rosetta file type object.
| szFileName | [in] Full path of the file you want to load.
| |
| szTargetName | [in] Target object.
| |
| dwFlags | [in] Load flags (type of RsPckFileIOGenLoadFlags)
|
var root = System.GetMainDir();
var objName = root + '\\Rs Main Libraries\\Activities -Base\\Speak.RsObj';
var objLoad = Library2.DlgGenericLoad(objName,1,8);
| HRESULT IRiLibrary2::DlgGenericSave | ( | [in] VARIANT | szFileName, | |
| [in] VARIANT | szTargetName, | |||
| [in] VARIANT | dwFlags | |||
| ) |
Save specified object into a specified file.
| szFileName | Object File name.
| |
| szTargetName | [in] Specify the object that should be saved.
| |
| dwFlags | [in] Save flags (type of RsPckFileIOGenSaveFlags).
|
//need to have Vladimir go over this one
| HRESULT IRiLibrary2::DlgSaveScene | ( | [in] BSTR | bszFileName | ) |
Save the current scene to the file specified in a file dialog, clear 'scene changed' flag.
| bszFileName | [in] Initial file name displayed in the dialog. |
Library2.DlgSaveScene('myTestScene');
| HRESULT IRiLibrary2::Generate3DThumbnail | ( | [in] BSTR | bszObject, | |
| [in] RtDWORD | dwWidth, | |||
| [in] RtDWORD | dwHeight, | |||
| [out, retval] VARIANT * | pvRdBitmap | |||
| ) |
Try to generate 3D thumbnail for the object.
| bszObject | [in] Specify full string ID of the object you want to render. | |
| dwWidth | [in] Specify required width of the thumbnail. | |
| dwHeight | [in] Specify required height of the thumbnail. |
var tNail = System.CreateDO('Common Data Package/Bitmap Data'); tNail = Library2.Generate3DThumbnail(Node.FirstSelected(),60,60 ); params.ConValue('tNail') = tNail;
| HRESULT IRiLibrary2::GenerateSceneThumbnail | ( | [in] RtBOOL | bWholeScrn, | |
| [in] RtDWORD | dwWidth, | |||
| [in] RtDWORD | dwHeight, | |||
| [out, retval] VARIANT * | pvRdBitmap | |||
| ) |
Generate thumbnail from the current screen.
| bWholeScrn | [in] If true, then the whole screen shot will be used.
| |
| dwWidth | [in] Specify required width of the thumbnail. | |
| dwHeight | [in] Specify required height of the thumbnail. |
var SceneTNail = System.CreateDO('Common Data Package/Bitmap Data'); SceneTNail = Library2.GenerateSceneThumbnail(false, 60, 60); params.ConValue('SceneTNail') = SceneTNail;
| HRESULT IRiLibrary2::GetObjThumbnail | ( | [in] BSTR | bszObject, | |
| [out, retval] VARIANT * | pvRdBitmap | |||
| ) |
Most objects implement their own thumbnail. Call this method to get it.
| bszObject | [in] Specify full string ID of the object you want to render. |
var tNail = System.CreateDO('Common Data Package/Bitmap Data'); tNail = Library2.GetObjThumbnail(Node.FirstSelected()); params.ConValue('tNail') = tNail;
1.5.5