.
Scripting methods for the Rhino RDK
To get a scripting object for the Rhino RDK, use the following code:
dim rdk
set rdk = Rhino.GetPlugInObject("Renderer Development Kit")
Then use the rdk object to access the functions below.
Methods
FactoryList();
Return a list of RDK's content factory collection.
ContentList(strContentType)
Returns a list of contents for a certain type: material, texture, environment.
DeleteFactory(strFactoryId)
Deletes a content factory by its identifier.
FactoryKind(strFactoryId);
Returns the kind of the content.
FactoryNewContent(strFactoryId, strParentId)
Create a new content of the specified type.
FactoryContentTypeId(strFactoryId)
Returns the identifier of the content type.
FactoryContentInternalName(strFactoryId);
Returns the internal name of the content created by specified factory.
FactoryRenderEngineId(strFactoryId)
Returns the render engine id of the content that this factory produces.
FactoryPlugInId(strFactoryId)
Returns the plug-in id of the plug-in that created this factory.
FactoryRebuildCache(strFactoryId)
Rebuild the factory cache. This forces a refresh of cached data such as the factory name.
ContentRenderEngineId(strContentInstanceID)
Return Render engine identifier.
ContentPlugInId(strContentInstanceID)
Return The plug-in id of the plug-in that defines this content.
ContentTypeId(strContentInstanceID)
Return The unique id of the content type.
ContentInternalName(strContentInstanceID)
Return the internal name of the content type.
ContentTypeName(strContentInstanceID)
Return the name of the content type.
ContentTypeDescription(strContentInstanceID)
Return the description of the content type.
ContentCategory(strContentInstanceID)
Return the category of the content.
ContentKind(strContentInstanceID)
Return return a string uniquely identifying the kind of the content.
ContentLibraryFileExtension(strContentInstanceID)
Return the library file extension of the content.
CurrentContent(strContentInstanceID)
Returns if content is currently selected in thumbnail display.
ContentInstanceName(strContentInstanceID, strName)
Return content's name.
ContentNotes(strContentInstanceID, strNotes, strSendEvent)
Return the content's notes
ContentOpenInThumbnailEditor(strContentInstanceID)
Call this method to open the content in the relevant thumbnail editor and select it.
ContentParameter(strContentInstanceID, strName, varValue)
Returns or modifies a content parameter.
UngroupContent(strContentInstanceID)
Remove this content tree from any instance group it may be a member of.
ContentGroupId(strContentInstanceID)
Returns the group id which this content is a member of.
DeleteContent(strContentInstanceID)
Delete the content.
DuplicateContent(strContentInstanceID)
Duplicate the content.
ContentParent(strContentInstanceID)
Return parent content or empty string if this is the top level object.
ContentFirstChild(strContentInstanceID)
Return first child of this content or NULL if none.
ContentNextSibling(strContentInstanceID)
Return first sibling of this content or NULL if none.
ContentTopLevelParent(strContentInstanceID)
Return identifier of top level parent of this content.
ContentReplaceChild(VARIANT vaContentInstance, strOldChild, strNewChild)
Replace a child content.
ContentAddChild(strContentInstanceID, strContent)
Adds another content as a child of this content.
ContentChildSlotName(strContentInstanceID, strChildSlotName)
Return the child-slot-name of this content.
ContentChildSlotNameFromParamName(strContentInstanceID, strParamName)
Return the child-slot-name corresponding to a parameter name.
ContentParamNameFromChildSlotName(strContentInstanceID, strChildSlotName)
Return the parameter name corresponding to a child-slot-name.
ContentFindChild(strContentInstanceID, strChildSlotName)
Return the immediate child that has the specified child-slot-name or NULL if none.
IsContentTypeAcceptableAsChild(strContentInstanceID, strType, strChildSlotName)
Return true only if content type can be accepted as a child in the specified child slot.
IsTypeAcceptableAsChild(strContentInstanceID, strFactory, strChildSlotName)
Return true only if content produced by pFactory can be accepted as a child in the specified child slot.
ContentGetChildren(strContentInstanceID)
Return all the children of this content.
ContentGetChildSlots(strContentInstanceID)
Return all child slots.
ContentFactory(strContentInstanceID)
Return the factory that creates this type of content.
FindContentInstance(strContentInstanceID, strInstance)
Searches for the content with the specified instance id.
ContentDestroyChildContent(strContentInstanceID, strPlugIn)
Unlink and destroy all child contents belonging to the specified plug-in.
IsContentCompatible(strContentInstanceID, strRenderEngine)
A content is compatible with a render engine when its RenderEngineId() matches the id of the render engine.
IsContentUniversal(strContentInstanceID)
A content is universal if it is meant to be used with any render engine.
IsContentPrivate(strContentInstanceID)
A content is private if it is not intended to show in any editor.
ContentSaveToFile(strContentInstanceID, strFullPath)
Save the content to a library file.
ContentLoadFromFile(VARIANT vaFullPath)
Load content from a library file.
IsContentInDocument(strContentInstanceID)
Query whether or not the content is in the document.
ContentEmbeddedFiles(strContentInstanceID)
Return a semicolon-delimited string of full paths to files used by the content
ContentSupportsCommand(strContentInstanceID, strCommand)
Indicates whether or not the content supports a particular command.
ContentExecuteCommand(strContentInstanceID, strCommand)
Executes a command.
SunEnableAllowed([optional]
VARIANT vaAllowed)
Returns or modifies the sun enable allowed value.
SunEnableOn(bOn)
Returns or modifies the sun ON value
SunManualControlAllowed(bAllowed)
Returns or modifies the ManualControlAllowed value.
SunManualControlOn(bManual)
Returns or modifies the ManualControlOn value.
SunNorth(dblNorth)
Returns or modifies the azimuth corresponding to North.
SunVector(vVector)
Return the sun's direction vector in world space,
SunAzimuth(dblAzimuth)
Return the azimuth of the sun in degrees.
SunAltitude(dblAltitude)
Return the altitude of the sun in degrees.
SunLatitude(dblLatitude)
Return the latitude of the observer.
SunLongitude(dblLongitude)
Return the longitude of the observer.
SunTimeZone(dblHours)
Return the time zone of the observer in hours.
SunDaylightSavingOn(bOn)
Return true if daylight saving is on
SunDaylightSavingMinutes(intMinutes)
Return the daylight saving of the observer in minutes.
SunLocalDate(intDate)
Retrieves the local date of the observer.
SunLocalTime(dblHours)
Retrieves the local time of the observer.
SunUTCDate(intDate)
Retrieves the UTC date of the observer.
SunUTCTime(dblHours)
Retrieves the UTC time of the observer.
SunLight()
Get an ON_Light which represents the sun.
]
MaterialInstanceId(intMaterialTableIndex)
Returns the content instance id for a given index into the Rhino material table
SetMaterialInstanceId(strInstanceId, intMaterialTableIndex)
Assigns a certain content to a material table index.
HSB2RGB(arrColor)
Converts color
RGB2HSB(arrColor)
Converts color
ShowContentChooser(strDefaultType, strDefaultInstance, strAllowedKinds)
Shows the content chooser to allow the user to select a new or existing content.
ContentKindList()
Returns list of content kinds.
]
SelectedContent(strContentType)
Get the selected content of the specified kind.
OpenFloatingContentPreview(strContentInstanceID, arrPos, arrSize)
Open content preview window.
CloseFloatingContentPreview(strWindowId)
Close content preview window.
ContentResetToDefaults(strContentInstanceID)
Reset content to defaults.
ChangeContent(strContentInstanceID, strNewContentId, bHarvest)
Change content.