public abstract class RenderMaterial : RenderContent

Properties

CanBeEdited

public bool CanBeEdited { get; }
Determines if the content can be edited.
inherited fromRenderContent

Category

public string Category { get; }
Category for this content.
inherited fromRenderContent

ChildSlotDisplayName

public string ChildSlotDisplayName { get; }
Returns the localized display name of the child slot name
inherited fromRenderContent

ChildSlotName

public string ChildSlotName { get; set; }
inherited fromRenderContent

CppPointer

public nint CppPointer { get; }
inherited fromRenderContent

DefaultPreviewBackgroundType

#Since v5.11
public RenderMaterial.PreviewBackgroundType DefaultPreviewBackgroundType { get; set; }
Set or get the default scene background for the image that appears in preview panes

DefaultPreviewGeometryType

#Since v5.11
public RenderMaterial.PreviewGeometryType DefaultPreviewGeometryType { get; set; }
Set or get the default geometry that appears in preview panes

DefaultPreviewSize

#Since v5.11
public double DefaultPreviewSize { get; set; }
The default preview geometry size

DisplayName

public string DisplayName { get; }
Display name for this content.
inherited fromRenderContent

Document

public RhinoDoc Document { get; }
obsoleteUse DocumentOwner
Obsolete. Do not use. You should use DocumentOwner instead.
inherited fromRenderContent

DocumentAssoc

public RhinoDoc DocumentAssoc { get; set; }
If this render content is associated with a document in any way, the document will be returned. This includes copies of render contents that were attached to a document when the copy was made. Otherwise returns null.
inherited fromRenderContent

DocumentOwner

public RhinoDoc DocumentOwner { get; }
If this render content is owned by a document, the document will be returned. This is the same as getting the document the render content is attached to. Otherwise returns null.
inherited fromRenderContent

DocumentRegistered

public RhinoDoc DocumentRegistered { get; }
obsoleteUse DocumentOwner
Obsolete. Do not use. You should use DocumentOwner instead.
inherited fromRenderContent

Fields

public FieldDictionary Fields { get; }
Rhino.Render.Fields FieldDictionary which provides access to setting and retrieving field values.
inherited fromRenderContent

Filename

public virtual string Filename { get; set; }
If the content is file based, this function can be overridden to deal with setting/getting the filename. Corresponds to IRhRdkFileBasedContent in the C++ SDK
inherited fromRenderContent

FilesToEmbed

public virtual IEnumerable<string> FilesToEmbed { get; }
A string array of full paths to files used by the content that may be embedded in .3dm files and library files (.rmtl, .renv, .rtex). The default implementation returns an empty string list. Override this to return the file name or file names used by your content. This is typically used by textures that reference files containing the texture imagery.
inherited fromRenderContent

FirstChild

public RenderContent FirstChild { get; }
Return First child of this content or null if none.
inherited fromRenderContent

GemMaterialGuid

#Since v6.0
public static Guid GemMaterialGuid { get; }

GlassMaterialGuid

#Since v6.0
public static Guid GlassMaterialGuid { get; }

GroupId

public Guid GroupId { get; set; }
Group ID of the content
inherited fromRenderContent

Hidden

public bool Hidden { get; set; }
Gets or sets the render content's 'hidden' state. This feature only works for top-level render contents because it hides the entire hierarchy. It is normally used for 'implementation detail' render contents. For expert use only. Hidden render contents are never shown in the UI, with the exception of the Object (or Layer) Material Properties UI which always shows whatever is assigned to the object (or layer). In the Object (or Layer) Material Properties UI, if the user drops down the list, hidden render contents are not listed. Hidden render contents, being part of the document content list, will be listed by any scripts or other code that iterates over the document render content list. It is recommended that you set IsHidden once when you create your render content and leave it on to prevent flicker or slow performance.
inherited fromRenderContent

Id

public Guid Id { get; set; }
Instance identifier for this content.
inherited fromRenderContent

IsDefaultInstance

public bool IsDefaultInstance { get; }
Checks if render content is default instance.
inherited fromRenderContent

IsHiddenByAutoDelete

public bool IsHiddenByAutoDelete { get; }
Contents can be created as 'auto-delete' by certain commands such as 'Picture'. These contents are automatically hidden from the user when the associated Rhino object is deleted. They are later deleted when the document is saved.
inherited fromRenderContent

IsLocked

public bool IsLocked { get; set; }
Set this property to true prior to adding content to the document to lock the content browser editing UI methods. Setting this to true will keep the browser from allowing things like deleting, renaming or changing content. This is useful for custom child content that you want to be editable but persistent. Setting this after adding content to the document will cause an exception to be thrown.
inherited fromRenderContent
ExceptionIsLocked must be called prior to adding content to the document

MetalMaterialGuid

#Since v6.0
public static Guid MetalMaterialGuid { get; }

ModelUnits

public LengthUnit ModelUnits { get; }
Units used by this instance on length fields.
inherited fromRenderContent

Name

public string Name { get; set; }
Instance 'raw' name for this content.
inherited fromRenderContent

NextSibling

public RenderContent NextSibling { get; }
Return First sibling of this content or null if none.
inherited fromRenderContent

Notes

public string Notes { get; set; }
Notes for this content.
inherited fromRenderContent

PaintMaterialGuid

#Since v6.0
public static Guid PaintMaterialGuid { get; }

Parent

public RenderContent Parent { get; }
Returns the top content in this parent/child chain.
inherited fromRenderContent

PictureMaterialGuid

#Since v6.0
public static Guid PictureMaterialGuid { get; }

PlasterMaterialGuid

#Since v6.0
public static Guid PlasterMaterialGuid { get; }

PlasticMaterialGuid

#Since v6.0
public static Guid PlasticMaterialGuid { get; }

Private

public bool Private { get; }
The Content type should not be shown in the UI if Private is true
inherited fromRenderContent

ProxyType

public ProxyTypes ProxyType { get; }
Gets the proxy type of the render content
inherited fromRenderContent

RenderHash

[CLSCompliant(false)] public uint RenderHash { get; }
Render hash for the content hierarchy. It iterates over children and includes a caching mechanism which means the hash value can be retrieved quickly if it hasn't changed. The cache is invalidated when Changed() is called. You can override the RenderContent.CalculateRenderHash(ulong) method to provide a custom hash value.
inherited fromRenderContent

SmellsLikeGem

#Since v6.0
public bool SmellsLikeGem { get; }

SmellsLikeGlass

#Since v6.0
public bool SmellsLikeGlass { get; }

SmellsLikeMetal

#Since v6.0
public bool SmellsLikeMetal { get; }

SmellsLikePaint

#Since v6.0
public bool SmellsLikePaint { get; }

SmellsLikePlaster

#Since v6.0
public bool SmellsLikePlaster { get; }

SmellsLikePlastic

#Since v6.0
public bool SmellsLikePlastic { get; }

SmellsLikeTexturedGem

#Since v6.0
public bool SmellsLikeTexturedGem { get; }

SmellsLikeTexturedGlass

#Since v6.0
public bool SmellsLikeTexturedGlass { get; }

SmellsLikeTexturedMetal

#Since v6.0
public bool SmellsLikeTexturedMetal { get; }

SmellsLikeTexturedPaint

#Since v6.0
public bool SmellsLikeTexturedPaint { get; }

SmellsLikeTexturedPlaster

#Since v6.0
public bool SmellsLikeTexturedPlaster { get; }

SmellsLikeTexturedPlastic

#Since v6.0
public bool SmellsLikeTexturedPlastic { get; }

Tags

public string Tags { get; set; }
Tags for this content.
inherited fromRenderContent

TopLevel

public bool TopLevel { get; }
Returns true if this content has no parent, false if it is the child of another content.
inherited fromRenderContent

TopLevelParent

public RenderContent TopLevelParent { get; }
Returns the top content in this parent/child chain.
inherited fromRenderContent

TypeDescription

public abstract string TypeDescription { get; }
Description for your content type. i.e., "Procedural checker pattern"
inherited fromRenderContent

TypeId

public Guid TypeId { get; }
Type identifier for this content
inherited fromRenderContent

TypeName

public abstract string TypeName { get; }
Name for your content type. i.e., "My .net Texture"
inherited fromRenderContent

Xml

public string Xml { get; }
inherited fromRenderContent

Methods

AddAutomaticUserInterfaceSection

public bool AddAutomaticUserInterfaceSection(string caption, int id)
Add a new automatic user interface section, Field values which include prompts will be automatically added to this section.
inherited fromRenderContent
caption (string)Expandable tab caption.
id (int)Tab id which may be used later on to reference this tab.
Returns true if the automatic tab section was added otherwise; returns false on error.

AddChild

public bool AddChild(RenderContent renderContent, string childSlotName)
obsoleteThis method is obsolete and simply calls SetChild
Obsoleteinherited fromRenderContent
renderContent (RenderContent)
childSlotName (string)

AddChild

public bool AddChild(RenderContent renderContent)
obsoleteThis method is obsolete and simply calls SetChild
Obsoleteinherited fromRenderContent
renderContent (RenderContent)

AddUserInterfaceSection

public bool AddUserInterfaceSection(ICollapsibleSection section)
inherited fromRenderContent
section (ICollapsibleSection)

AddUserInterfaceSection

public UserInterfaceSection AddUserInterfaceSection(Type classType, string caption, bool createExpanded, bool createVisible)
obsoleteUse AddUserInterfaceSection(Rhino.UI.Controls.ICollapsibleSection) below instead. This function will not work on the Mac and is not type-safe.
Add a new .NET control to an content expandable tab section, the height of the createExpanded tabs client area will be the initial height of the specified control.
Obsoleteinherited fromRenderContent
classType (Type)The control class to create and embed as a child window in the expandable tab client area. This class type must be derived from IWin32Window or this method will throw an ArgumentException. Implement the IUserInterfaceSection interface in your classType to get UserInterfaceSection notification.
caption (string)Expandable tab caption.
createExpanded (bool)If this value is true then the new expandable tab section will initially be expanded, if it is false it will be collapsed.
createVisible (bool)If this value is true then the new expandable tab section will initially be visible, if it is false it will be hidden.
Returns the UserInterfaceSection object used to manage the new user control object.

AssignTo

#Since v7.13
public bool AssignTo(IEnumerable<ObjRef> objrefs, AssignToSubFaceChoices sfc, AssignToBlockChoices bc, bool bInteractive)

AssignTo

#Since v7.13
public bool AssignTo(ObjRef or)
or (ObjRef)

BeginChange

public void BeginChange(ChangeContexts changeContext)
Begins a change or batch of changes. It may also make a copy of the content state allowing RenderContent.EndChange() to send an event with the old and new contents. Calls to this method are counted; you must call EndChange() once for every call to BeginChange(). Note: If Changed() was called between the calls to BeginChange() and EndChange(), the last call to EndChange() may cause the ContentChanged event to be sent.
inherited fromRenderContent
changeContext (RenderContent.ChangeContexts)the change context. If this is ChangeContexts.UI, ChangeContexts.Program,ChangeContexts.Drop or ChangeContexts.Tree, the content will be copied. EndChange() will then send the copy as 'old' in the OnContentChanged event. RenderContent.EndChange() RenderContent.ContentChanged

BeginCreateDynamicFields

public void BeginCreateDynamicFields(bool automatic)
Automatic Dynamic Field support. Dynamic fields are typically created in the constructor of RenderContent and they are therefore created automatically whenever the content is created. However, some advanced users require the fields to be created in response to some user action which occurs much later. This creates the problem that the fields do not exist by default and therefore cannot be loaded when the document is loaded. These methods are provided to solve that problem by making it possible to automatically create the dynamic fields on loading if they don't already exist. Dynamic fields that have this auto-create-on-load behavior are referred to as automatic dynamic fields. Dynamic fields that do not require the advanced automatic feature can still be created by using these methods (recommended), or they can be created manually (legacy usage). You must call this before creating any dynamic fields. Calls to this method are counted; you must call EndCreateDynamicFields() once for every call to BeginCreateDynamicFields().
inherited fromRenderContent
automatic (bool)automatic specifies if the dynamic fields are automatic. If so, they will be created automatically during loading of the document.

BindParameterToField

public void BindParameterToField(string parameterName, Field field, ChangeContexts setEvent)
Use bindings to automatically wire parameters to fields
inherited fromRenderContent
parameterName (string)
field (Field)
setEvent (RenderContent.ChangeContexts)

BindParameterToField

public void BindParameterToField(string parameterName, string childSlotName, Field field, ChangeContexts setEvent)
Use bindings to automatically wire parameters to fields
inherited fromRenderContent
parameterName (string)
childSlotName (string)
field (Field)
setEvent (RenderContent.ChangeContexts)

CalculateRenderHash

[CLSCompliant(false)] protected virtual uint CalculateRenderHash(ulong rcrcFlags)
obsoleteUse CalculateRenderHash2
Override this method to calculate the render hash of the state that affects how the content is rendered. Does not include children or perform any caching. Render hash values are now automatically cached by the content framework and you do not have to worry about caching. You also do not have to worry about iterating into children. This method is now only called internally by the framework, use the RenderHash property to get the current hash value.
inherited fromRenderContent
rcrcFlags (ulong)

CalculateRenderHash2

[CLSCompliant(false)] protected virtual uint CalculateRenderHash2(CrcRenderHashFlags flags, string[] excludeParameterNames)
inherited fromRenderContent
flags (CrcRenderHashFlags)
excludeParameterNames (string[])

ChangeChild

public bool ChangeChild(RenderContent oldContent, RenderContent newContent)
obsoleteThis method is obsolete and simply calls SetChild
Obsoleteinherited fromRenderContent
oldContent (RenderContent)
newContent (RenderContent)

ChildSlotAmount

public double ChildSlotAmount(string childSlotName)
Gets the amount property for the texture in the specified child slot.
inherited fromRenderContent
childSlotName (string)The child slot name of the texture.
The requested amount value. Values are typically from 0.0 to 100.0

ChildSlotNameFromParamName

public string ChildSlotNameFromParamName(string paramName)
A "child slot" is the specific "slot" that a child (usually a texture) occupies. This is generally the "use" of the child - in other words, the thing the child operates on. Some examples are "color", "transparency".
inherited fromRenderContent
paramName (string)The name of a parameter field. Since child textures will usually correspond with some parameter (they generally either replace or modify a parameter over UV space) these functions are used to specify which parameter corresponded with child slot. If there is no correspondence, return the empty string.
The default behavior for these functions is to return the input string. Sub-classes may (in the future) override these functions to provide different mappings.

ChildSlotOn

public bool ChildSlotOn(string childSlotName)
Gets the on-ness property for the texture in the specified child slot.
inherited fromRenderContent
childSlotName (string)The child slot name of the texture.
true if successful, else false.

ConvertToPhysicallyBased

#Since v7.0
public PhysicallyBasedMaterial ConvertToPhysicallyBased(TextureGeneration tg)
Returns a material that is the best approximation of the original, but as a physically based material.
tg (RenderTexture.TextureGeneration)Determines whether simulated textures will be generated as files.

ConvertUnits

public virtual void ConvertUnits(LengthUnit from, LengthUnit to)
Modify your content so that it is converted from meters into the units of the unit system. No need to call the base class when you override this, and no need to recurse into children.
inherited fromRenderContent
from (LengthUnit)
to (LengthUnit)

ConvertUnits

[EditorBrowsable(EditorBrowsableState.Never)] public virtual void ConvertUnits(UnitSystem from, UnitSystem to)
obsolete. Use ConvertUnits with LengthUnit instead, and don't override this virtual function
Modify your content so that it is converted from meters into the units of the unit system. No need to call the base class when you override this, and no need to recurse into children.
Obsoleteinherited fromRenderContent
from (UnitSystem)
to (UnitSystem)

CreateBasicMaterial

#Since v6.4
public static RenderMaterial CreateBasicMaterial(Material material, RhinoDoc doc)
material (Material)
doc (RhinoDoc)

CreateBasicMaterial

#Since v5.1 Obsolete v7.1
public static RenderMaterial CreateBasicMaterial(Material material)
obsoleteUse CreateBasicMaterial(DocObjects.Material material, RhinoDoc doc) instead
Constructs a new basic material from a Material.
material (Material)(optional)The material to create the basic material from.
A new basic material.

CreateDynamicField

public bool CreateDynamicField(string internalName, string localName, string englishName, object value, object minValue, object maxValue, int sectionId)
Create a dynamic field with an initial value and min and max limits.
inherited fromRenderContent
internalName (string)is the internal name of the field. Not localized.
localName (string)is the localized user-friendly name of the field.
englishName (string)is the English user-friendly name of the field.
value (object)is the initial value of the field.
minValue (object)is the minimum value of the field. Must be the same type as vValue.
maxValue (object)is the maximum value of the field. Must be the same type as vValue.
sectionId (int)is used for filtering fields between sections. Zero if not needed.

CreateImportedMaterial

#Since v7.0
public static RenderMaterial CreateImportedMaterial(Material material, RhinoDoc doc, bool reference)
material (Material)
doc (RhinoDoc)
reference (bool)

DeleteAllChildren

public void DeleteAllChildren(ChangeContexts changeContexts)
inherited fromRenderContent
changeContexts (RenderContent.ChangeContexts)

DeleteChild

public bool DeleteChild(string childSlotName, ChangeContexts changeContexts)
inherited fromRenderContent
childSlotName (string)
changeContexts (RenderContent.ChangeContexts)

Dispose

public void Dispose()
inherited fromRenderContent

Dispose

protected virtual void Dispose(bool disposing)
Dispose
inherited fromRenderContent
disposing (bool)

DynamicIcon

public virtual bool DynamicIcon(Size size, out Bitmap bitmap, DynamicIconUsage usage)
inherited fromRenderContent
size (Size)
bitmap (out Bitmap)
usage (DynamicIconUsage)

Edit

public RenderContent Edit()
This method allows a render content hierarchy to be edited using a modal (AKA 'pop-up') editor. If the original render content is in a document, it will remain there, and the edited one will be 'free-floating'. Therefore it is the caller's responsibility to do any replacement in the document if required. The returned new content will be owned by the caller.
inherited fromRenderContent
Returns an edited version of the content hierarchy if successful, else null. The method always edits the entire hierarchy. It places a copy of the hierarchy in the editor and selects the copied item that corresponds to this one. Therefore, editing a child will return a top-level render content, not a child.

EndChange

public void EndChange()
Ends a change or batch of changes. Calls to this method are counted; you must call this method once for every call to RenderContent.BeginChange(RenderContent.ChangeContexts). Note: If RenderContent.BeginChange(RenderContent.ChangeContexts) was called with ChangeContexts.UI, ChangeContexts.Program, ChangeContexts.Drop or ChangeContexts.UI.Tree and Changed() was called between the calls to RenderContent.BeginChange(RenderContent.ChangeContexts) and EndChange(), the last call to EndChange() will raise the RenderContent.ContentChanged event.
inherited fromRenderContent

EndCreateDynamicFields

public void EndCreateDynamicFields()
You must call this after creating dynamic fields. Calls to this method are counted; you must call BeginCreateDynamicFields() once for every call to EndCreateDynamicFields().
inherited fromRenderContent

FindChild

public RenderContent FindChild(string childSlotName)
inherited fromRenderContent
childSlotName (string)

ForDisplay

public RenderContent ForDisplay()
**** This method is for proxies and will be marked obsolete in the future **** The only place a single proxy can be displayed is in the New Content Control main thumbnail. All other attempts to use a single proxy in a UI require it to be replaced with the corresponding multi proxy. Single proxies override this to find the corresponding multi proxy.
inherited fromRenderContent
The render content.

FromMaterial

#Since v7.1
public static RenderMaterial FromMaterial(Material material, RhinoDoc doc)
Constructs a new material from a Material.
material (Material)(optional)The material to create the material from.
doc (RhinoDoc)The document to associate this material with.
A new material - either a "Custom" material or a "Physically Based" material depending on the return value of material.IsPhysicallyBased.

GetChildSlotParameter

public virtual object GetChildSlotParameter(string contentParameterName, string extraRequirementParameter)
Extra requirements are a way of specifying extra functionality on parameters in the automatic UI. Override this function to specify additional functionality for automatic UI sections or the texture summary. See IAutoUIExtraRequirements.h in the C++ RDK SDK for string definitions for the parameter names. Call the base class from your override if you do not support the extra requirement parameter. Please do not call this function. It is only retained for backward compatibility. You should instead call GetExtraRequirementParameter().
inherited fromRenderContent
contentParameterName (string)The parameter or field internal name to which this query applies.
extraRequirementParameter (string)The extra requirement parameter, as listed in IAutoUIExtraRequirements.h in the C++ RDK SDK.
The value of the requested extra requirement parameter or null if the parameter does not exist. Current supported return values are (int, bool, float, double, string, Guid, Color, Vector3d, Point3d, DateTime).

GetEmbeddedFilesList

public string[] GetEmbeddedFilesList()
inherited fromRenderContent

GetExtraRequirementParameter

public object GetExtraRequirementParameter(string contentParameterName, string extraRequirementParameter)
Extra requirements are a way of specifying extra functionality on parameters in the automatic UI. See IAutoUIExtraRequirements.h in the C++ RDK SDK for string definitions for the parameter names.
inherited fromRenderContent
contentParameterName (string)The parameter or field internal name to which this query applies.
extraRequirementParameter (string)The extra requirement parameter, as listed in IAutoUIExtraRequirements.h in the C++ RDK SDK.
The value of the requested extra requirement parameter or null if the parameter does not exist. Current supported return values are (int, bool, float, double, string, Guid, Color, Vector3d, Point3d, DateTime).

GetParameter

[CLSCompliant(false)] public virtual object GetParameter(string parameterName)
Query the content instance for the value of a given named parameter. If you do not support this parameter, call the base class.
inherited fromRenderContent
parameterName (string)Name of the parameter
IConvertible. Note that you can't directly cast from object, instead you have to use the Convert mechanism.

GetTextureAmountFromUsage

#Since v6.0
public double GetTextureAmountFromUsage(StandardChildSlots slot)

GetTextureFromUsage

#Since v6.0
public RenderTexture GetTextureFromUsage(StandardChildSlots slot)

GetTextureOnFromUsage

#Since v6.0
public bool GetTextureOnFromUsage(StandardChildSlots slot)

GetUiHash

[CLSCompliant(false)] public virtual ulong GetUiHash()
This allows a content to have more than one UI for the same content type.
inherited fromRenderContent
Default is zero and is ignored.

GetUnderlyingInstances

public bool GetUnderlyingInstances(RenderContentCollection collection)
inherited fromRenderContent
collection (RenderContentCollection)

HandleTexturedValue<T>

#Since v6.12
public bool HandleTexturedValue<T>(string slotname, TexturedValue<T> tc)
Handle a textured content field. Values will be read into an instance of TexturedColor
slotname (string)
tc (TexturedValue<T>)
true if reading the base value succeeded

Icon

public virtual bool Icon(Size size, out Bitmap bitmap)
inherited fromRenderContent
size (Size)
bitmap (out Bitmap)

ImportMaterialAndAssignToLayers

#Since v8.0
public static bool ImportMaterialAndAssignToLayers(RhinoDoc doc, string file, IEnumerable<int> layer_indices)
Imports a material file (.RMTL) and assigns the imported material to one or more layers.
doc (RhinoDoc)The document to attach the imported material to and which also contains the layers.
file (string)The full path to the RMTL file to be imported.
layer_indices (IEnumerable<int>)An array of indices of the layers to assign the material to.
True if successful, else false.

Initialize

public bool Initialize()
obsoleteThis method should not be called.
Obsoleteinherited fromRenderContent

IsCompatible

public virtual bool IsCompatible(Guid renderEngineId)
inherited fromRenderContent
renderEngineId (Guid)

IsContentTypeAcceptableAsChild

public virtual bool IsContentTypeAcceptableAsChild(Guid type, string childSlotName)
inherited fromRenderContent
type (Guid)
childSlotName (string)

IsFactoryProductAcceptableAsChild

public virtual bool IsFactoryProductAcceptableAsChild(ContentFactory factory, string childSlotName)
inherited fromRenderContent
factory (ContentFactory)
childSlotName (string)

IsFactoryProductAcceptableAsChild

public virtual bool IsFactoryProductAcceptableAsChild(Guid kindId, string factoryKind, string childSlotName)
Override this method to restrict the type of acceptable child content. The default implementation of this method returns true if the factory kind is 'texture'.
inherited fromRenderContent
kindId (Guid)
factoryKind (string)
childSlotName (string)
Return true only if content with the specified kindId can be accepted as a child in the specified child slot.

IsReference

public bool IsReference()
Query whether or not the content or any of its ancestors is a reference content.
inherited fromRenderContent
true if the content is a reference, else false

IsRenderHashCached

public bool IsRenderHashCached()
obsoleteThis method is deprecated and no longer called. For more information see CalculateRenderHash
This method is deprecated and no longer called. For more information see RenderContent.CalculateRenderHash(ulong)
Obsoleteinherited fromRenderContent
bool

MakeCopy

public RenderContent MakeCopy()
Create a copy of the render content. All content is the same, except for the instance Id.
inherited fromRenderContent
The new RenderContent

MakeGroupInstance

public RenderContent MakeGroupInstance()
Create an 'instance' of the content hierarchy and group the new hierarchy with this hierarchy. If the instance is subsequently attached to the same document, the state of all members of the group will be kept synchronized. With the exception of the instance ids, all state is exactly preserved in the new instance hierarchy. \note The grouping will have no effect until the new instance is attached to the same document.
inherited fromRenderContent
A grouped instance of the content hierarchy.

MatchData

public virtual RenderContent.MatchDataResult MatchData(RenderContent oldContent)
Implement to transfer data from another content to this content during creation.
inherited fromRenderContent
oldContent (RenderContent)An old content object from which the implementation may harvest data.
Information about how much data was matched.

ModifyRenderContentStyles

protected void ModifyRenderContentStyles(RenderContentStyles stylesToAdd, RenderContentStyles stylesToRemove)
ModifyRenderContentStyles
inherited fromRenderContent
stylesToAdd (RenderContentStyles)
stylesToRemove (RenderContentStyles)

NewPreviewSceneServer

public PreviewSceneServer NewPreviewSceneServer(SceneServerData ssd)
Gets the PreviewSceneServer of the content
inherited fromRenderContent
ssd (SceneServerData)SceneServerData

OnAddUserInterfaceSections

protected virtual void OnAddUserInterfaceSections()
Override to provide UI sections to display in the editor.
inherited fromRenderContent

OnGetDefaultsInteractive

protected virtual bool OnGetDefaultsInteractive()
Override this method to prompt user for information necessary to create a new content object. For example, if you are created a textured material you may prompt the user for a bitmap file name prior to creating the textured material.
inherited fromRenderContent
If true is returned the content is created otherwise the creation is aborted.

OnMakeCopy

protected virtual void OnMakeCopy(ref RenderContent newContent)
Override this function to supplement the standard copying behavour for your RenderContent.
inherited fromRenderContent
newContent (ref RenderContent)Is the content that will be returned from MakeCopy.

OpenInEditor

public bool OpenInEditor()
Call this method to open the content in the relevant thumbnail editor and select it for editing by the user. The content must be in the document or the call will fail.
inherited fromRenderContent
Returns true on success or false on error.

OpenInModalEditor

public bool OpenInModalEditor()
obsoleteObsolete, use Edit a version that returns a RenderContent
Call this method to open the content in the a modal version of the editor. The content must be in the document or the call will fail.
Obsoleteinherited fromRenderContent
Returns true on success or false on error.

ParamNameFromChildSlotName

public string ParamNameFromChildSlotName(string childSlotName)
A "child slot" is the specific "slot" that a child (usually a texture) occupies. This is generally the "use" of the child - in other words, the thing the child operates on. Some examples are "color", "transparency".
inherited fromRenderContent
childSlotName (string)The named of the child slot to receive the parameter name for.
The default behavior for these functions is to return the input string. Sub-classes may (in the future) override these functions to provide different mappings.

RenderHashExclude

[CLSCompliant(false)] public uint RenderHashExclude(CrcRenderHashFlags flags, string excludeParameterNames, LinearWorkflow lw)
As RenderHash, but allows you to specify flags and exclude specific parameters. Use this version of the function to calculate a render hash when you have the linear workflow information and you are not running on the main thread. Access to LinearWorkflow data requires document access. CrcRenderHashFlags.ExcludeLinearWorkflow must be specified.
inherited fromRenderContent
flags (CrcRenderHashFlags)Flags to finely control the render hash.
excludeParameterNames (string)Semicolon-delimited string of parameter names to exclude.
lw (LinearWorkflow)Linear Workflow to use.
The render hash.

RenderHashExclude

[CLSCompliant(false)] public uint RenderHashExclude(CrcRenderHashFlags flags, string excludeParameterNames)
As RenderHash, but allows you to specify flags and exclude specific parameters.
inherited fromRenderContent
flags (CrcRenderHashFlags)Flags to finely control the render hash.
excludeParameterNames (string)Semicolon-delimited string of parameter names to exclude.
The render hash.

RenderHashExclude

[CLSCompliant(false)] public uint RenderHashExclude(TextureRenderHashFlags flags, string excludeParameterNames)
This method is deprecated in favor of the one that takes CrcRenderHashFlags.
Obsoleteinherited fromRenderContent
flags (TextureRenderHashFlags)
excludeParameterNames (string)

Replace

public bool Replace(RenderContent newcontent)
inherited fromRenderContent
newcontent (RenderContent)

SaveToFile

public bool SaveToFile(string filename, EmbedFilesChoice embedFilesChoice)
Saves content to a file - RMTL, RENV or RTEX.
inherited fromRenderContent
filename (string)Full path to the file to be saved.
embedFilesChoice (RenderContent.EmbedFilesChoice)
The loaded content or null if an error occurred.

SetChild

public bool SetChild(RenderContent renderContent, string childSlotName, ChangeContexts changeContexts)
obsoleteUse SetChild without ChangeContexts and Begin/EndChange
Set another content as a child of this content. This content may or may not be attached to a document. If this content already has a child with the specified child slot name, that child will be deleted. If this content is not attached to a document, the child will be added without sending any events. If this content is attached to a document, the necessary events will be sent to update the UI. Note: Do not call this method to add children in your constructor. If you want to add default children, you should override Initialize() and add them there.
Obsoleteinherited fromRenderContent
renderContent (RenderContent)Child content to add to this content. If pChild is NULL, the function will fail. If pChild is already attached to a document, the function will fail. If pChild is already a child of this or another content, the function will fail.
childSlotName (string)The name that will be assigned to this child slot. The child slot name cannot be an empty string. If it is, the function will fail.
changeContexts (RenderContent.ChangeContexts)
Returns true if the content was added or the child slot with this name was modified otherwise; returns false.

SetChild

public bool SetChild(RenderContent renderContent, string childSlotName)
Set another content as a child of this content. This content may or may not be attached to a document. If this content already has a child with the specified child slot name, that child will be deleted. If this content is not attached to a document, the child will be added without sending any events. If this content is attached to a document, the necessary events will be sent to update the UI. Note: Do not call this method to add children in your constructor. If you want to add default children, you should override Initialize() and add them there.
inherited fromRenderContent
renderContent (RenderContent)Child content to add to this content. If renderContent is null, the function will fail. If renderContent is already attached to a document, the function will fail. If renderContent is already a child of this or another content, the function will fail.
childSlotName (string)The name that will be assigned to this child slot. The child slot name cannot be an empty string. If it is, the function will fail.
Returns true if the content was added or the child slot with this name was modified, otherwise returns false.

SetChildSlotAmount

public void SetChildSlotAmount(string childSlotName, double amount, ChangeContexts cc)
Sets the amount property for the texture in the specified child slot.
inherited fromRenderContent
childSlotName (string)The child slot name of the texture.
amount (double)The texture amount. Values are typically from 0.0 to 100.0
cc (RenderContent.ChangeContexts)The context of the change.

SetChildSlotOn

public void SetChildSlotOn(string childSlotName, bool bOn, ChangeContexts cc)
Sets the on-ness property for the texture in the specified child slot.
inherited fromRenderContent
childSlotName (string)The child slot name of the texture.
bOn (bool)Value for the on-ness property.
cc (RenderContent.ChangeContexts)Context of the change

SetChildSlotParameter

public virtual bool SetChildSlotParameter(string contentParameterName, string extraRequirementParameter, object value, ExtraRequirementsSetContexts sc)
Extra requirements are a way of specifying extra functionality on parameters in the automatic UI. Override this function to support values being set from automatic UI sections or the texture summary. See IAutoUIExtraRequirements.h in the C++ RDK SDK for string definitions for the parameter names. Call the base class from your override if you do not support the extra requirement parameter. Please do not call this function. It is only retained for backward compatibility. You should instead call SetExtraRequirementParameter().
inherited fromRenderContent
contentParameterName (string)The parameter or field internal name to which this query applies.
extraRequirementParameter (string)The extra requirement parameter, as listed in IAutoUIExtraRequirements.h in the C++ RDK SDK.
value (object)The value to set this extra requirement parameter. You will typically use System.Convert to convert the value to the type you need.
sc (RenderContent.ExtraRequirementsSetContexts)The context of this operation.
true if successful, else false.

SetExtraRequirementParameter

public bool SetExtraRequirementParameter(string contentParameterName, string extraRequirementParameter, object value, ExtraRequirementsSetContexts sc)
Extra requirements are a way of specifying extra functionality on parameters in the automatic UI. See IAutoUIExtraRequirements.h in the C++ RDK SDK for string definitions for the parameter names.
inherited fromRenderContent
contentParameterName (string)The parameter or field internal name to which this query applies.
extraRequirementParameter (string)The extra requirement parameter, as listed in IAutoUIExtraRequirements.h in the C++ RDK SDK.
value (object)The value to set this extra requirement parameter. You will typically use System.Convert to convert the value to the type you need.
sc (RenderContent.ExtraRequirementsSetContexts)The context of this operation.
true if successful, else false.

SetIsRenderHashRecursive

public void SetIsRenderHashRecursive(bool recursive)
By default, RenderHash recurses into children when computing the render hash. However, some applications may require children to be excluded from the render hash calculation. Call this method to enable or disable recursing into children. see RenderContent.RenderHash
inherited fromRenderContent
recursive (bool)

SetName

public void SetName(string name, bool renameEvents, bool ensureNameUnique)
Set instance name for this content
inherited fromRenderContent
name (string)
renameEvents (bool)
ensureNameUnique (bool)

SetParameter

public virtual bool SetParameter(string parameterName, object value, ChangeContexts changeContext)
obsoleteUse SetParameter without ChangeContexts and Begin/EndChange
Set the named parameter value for this content instance. If you do not support this parameter, call the base class.
Obsoleteinherited fromRenderContent
parameterName (string)
value (object)
changeContext (RenderContent.ChangeContexts)

SetParameter

public virtual bool SetParameter(string parameterName, object value)
Set the named parameter value for this content instance. If you do not support this parameter, call the base class.
inherited fromRenderContent
parameterName (string)
value (object)

SetRenderHash

[CLSCompliant(false)] public void SetRenderHash(uint hash)
obsoleteThis method is deprecated and no longer called. For more information see CalculateRenderHash
This method is deprecated and no longer called. For more information see RenderContent.CalculateRenderHash(ulong)
Obsoleteinherited fromRenderContent
hash (uint)

SimulatedMaterial

#Since v7.0 Obsolete v8.0
public Material SimulatedMaterial(TextureGeneration tg)
obsoleteUse ToMaterial instead for clarity. Same functionality.

SimulateMaterial

#Since v6.0 Obsolete v7.0
public virtual Material SimulateMaterial(bool isForDataOnly)
obsoleteIncorrect spelling - use ToMaterial instead, and don't override this virtual function
Call this function to receive the simulation for a RenderMaterial used by the display and other rendering engines.
isForDataOnly (bool)Called when only asking for a hash - don't write any textures to the disk - just provide the filenames they will get.
The simulation of the render material

SimulateMaterial

#Since v5.1 Obsolete v8.0
public virtual void SimulateMaterial(ref Material simulation, bool isForDataOnly)
obsoleteToMaterial with TextureGeneration instead, and don't override this virtual function
Override this function to provide a Rhino.DocObjects.Material definition for this material to be used by other rendering engines including the display.
simulation (ref Material)Set the properties of the input basic material to provide the simulation for this material.
isForDataOnly (bool)Called when only asking for a hash - don't write any textures to the disk - just provide the filenames they will get.

SimulateMaterial

#Since v7.0
public virtual void SimulateMaterial(ref Material simulation, TextureGeneration tg)
Override this function to provide a Rhino.DocObjects.Material definition for this material to be used by other rendering engines including the display.
simulation (ref Material)Set the properties of the input basic material to provide the simulation for this material.
tg (RenderTexture.TextureGeneration)See RenderTexture.TextureGeneration.

SlotFromTextureType

#Since v7.6
public static RenderMaterial.StandardChildSlots SlotFromTextureType(TextureType tt)
tt (TextureType)

SmartUngroupRecursive

public bool SmartUngroupRecursive()
Remove this content and all its children from any instance groups they may be a member of. If any content in the same document is left alone in the group, that content is also ungrouped. Records undo and sends events OnContentChanged and OnContentGroupIdChanged. \note This method is designed to be called from a content UI and is intended for RDK internal use but may be used as an expert user override.
inherited fromRenderContent
true if a content was ungrouped, \e false if no content or child was part of a group.

TextureChildSlotName

#Since v5.1
public virtual string TextureChildSlotName(StandardChildSlots slot)
Override this function to provide information about which texture is used for the standard (ie - defined in ON_Texture) texture channels.
slot (RenderMaterial.StandardChildSlots)An valid slot.
The texture used for the channel.

TextureTypeFromSlot

#Since v7.6
public static TextureType TextureTypeFromSlot(StandardChildSlots slot)

ToMaterial

#Since v8.0
public Material ToMaterial(TextureGeneration tg)

Ungroup

public bool Ungroup()
Remove this content from any instance group it may be a member of. Does not record undo but does send the OnContentGroupIdChanged event.
inherited fromRenderContent
true if content was ungrouped, \e false if it was not part of a group.

UngroupRecursive

public bool UngroupRecursive()
Remove this content and all its children from any instance groups they may be a member of. Does not record undo but does send the OnContentGroupIdChanged event.
inherited fromRenderContent
true if a content was ungrouped, \e false if no content or child was part of a group.

Uninitialize

public void Uninitialize()
obsoleteThis method should not be called.
Obsoleteinherited fromRenderContent

UseCount

public int UseCount()
UseCount returns how many times the content is used
inherited fromRenderContent

VirtualIcon

public virtual bool VirtualIcon(Size size, out Bitmap bitmap)
Icon to display in the content browser, this bitmap needs to be valid for the life of this content object, the content object that returns the bitmap is responsible for disposing of the bitmap.
inherited fromRenderContent
size (Size)Requested icon size
bitmap (out Bitmap)
Return Icon to display in the content browser.