Utilities
Properties
Get the plug-in Id for the default render plug-in
Specifies whether incompatible content should be shown in the corresponding editor.
Specifies whether incompatible content should be shown in the corresponding editor.
Methods
Changes the type of a content. This deletes the content and creates a replacement of the specified type allowing the caller to decide about harvesting.
public static RenderContent ChangeContentType()
oldContent,
oldContent is the old content which is deleted.
newType,
The type of content to replace pOldContent with.
harvestParameters
Determines whether or not parameter harvesting will be performed.
Returns: A new persistent render content.
Finds a file and also handles network shares. This is a replacement for CRhinoFileUtilities::FindFile().
[CLSCompliant(false)]
public static string FindFile()
doc,
Document to use for locating .3dm file's folder.
fullPathToFile,
The file to be found.
unpackFromBitmapTableIfNecessary
True to seasch for the file in the bitmap table and unpack it into the temp folder if not found in the initial search.
Returns: The found file.
Finds a file and also handles network shares. This is a replacement for CRhinoFileUtilities::FindFile().
[CLSCompliant(false)]
public static string FindFile()
doc,
Document to use for locating .3dm file's folder.
fullPathToFile
The file to be found.
Returns: The found file.
Gets a folder associated with the document for unpacking textures to
Returns: The path to the unpacked files folder
Exceptions:
| ArgumentNullException | When doc is null |
Determines if any texture in any persistent content list is using the specified file name for caching.
Returns: true if the texture is present.
Loads a content from a library file and adds it to the persistent content list of a particular document.
[CLSCompliant(false)]
public static RenderContent LoadPersistentRenderContentFromFile()
docSerialNumber,
identifies the document into which the content should be loaded.
filename
is the full path to the file to be loaded.
Returns: The loaded content or null if an error occurred.
Prompts the user for a save file name and the width, height and depth of an image to be saved.
Returns: The new file name.
Queries whether or not the Safe Frame is visible.
Set default render application
Returns: True if plug-in found and loaded successfully. False if pluginId is invalid or was unable to load plug-in
Shows the Content New / Existing Browser to allow the user to select a new or existing content.
public static Utilities.ShowContentChooserResults ShowContentChooser()
obsolete: Use ShowContentNewExistingBrowser() instead
Shows the Content New / Existing Browser to allow the user to select a new or existing content, or multiple contents.
public static Utilities.ShowContentChooserResults ShowContentChooser()
doc,
defaultType,
defaultInstanceId,
kinds,
flags,
presetCategory,
categories,
types,
instanceIdsOut
obsolete: Use ShowContentNewExistingBrowser() instead
Shows the Content New / Existing Browser to allow the user to select a new or existing content.
public static Utilities.ShowContentChooserResults ShowContentChooser()
doc,
defaultType,
defaultInstanceId,
kinds,
flags,
presetCategory,
categories,
types,
instanceIdsOut
obsolete: Use ShowContentNewExistingBrowser() instead
Shows the Content New / Existing Browser to allow the user to select a new or existing content, or multiple contents.
public static Utilities.ContentNewExistingResults ShowContentNewExistingBrowser()
doc,
A Rhino document.
defaultType,
The content type that will be initially selected in the 'New' tab.
defaultInstanceId,
The content instance that will be initially selected in the 'Existing' tab.
kinds,
Semicolon-delimited string specifying which content kinds will be displayed.
flags,
Flags controlling the browser (tabs to hide, type of selection).
presetCategory,
Specifies the category to preset in the drop-down list on the 'New' tab. If this string is empty, the preset category will be 'All'.
categories,
Specifies the categories to display. Render contents that do not belong to one of these categories will not be listed. If this array is empty, all render contents from all categories will be listed.
types,
Specifies content types to display. Contents that are not one of these types will not be listed. If this array is empty, all content types will be listed.
contents
Array of Guid(s) of the chosen item(s). Depending on the result, this can accept type id(s) of content type(s) or instance id(s) of existing content(s).
Returns: The result of displaying the browser.