Click or drag to resize

RenderContentCreate Method (Guid, RenderContent, String, RenderContentShowContentChooserFlags, RhinoDoc)

Constructs a new content of the specified type and attaches it to a document. This function cannot be used to create temporary content that you delete after use. Content created by this function is owned by RDK and appears in the content editor. To create a temporary content which is owned by you, call RenderContentType.NewContentFromTypeId().

Namespace:  Rhino.Render
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.1
public static RenderContent Create(
	Guid type,
	RenderContent parent,
	string childSlotName,
	RenderContentShowContentChooserFlags flags,
	RhinoDoc doc


Type: SystemGuid
The type of the content to create.
Type: Rhino.RenderRenderContent
Parent is the parent content. If not null, this must be an RDK-owned content that is attached to the document (either top-level or child). The new content then becomes its child. If null, the new content is added to the top-level document content list instead.
Type: SystemString
ChildSlotName is the unique child identifier to use for the new content when creating it as a child of parent (i.e., when parent is not null)
Type: Rhino.RenderRenderContentShowContentChooserFlags
Flags for future use (please always pass ShowContentChooserFlags::None).
Type: RhinoRhinoDoc
The Rhino document to attach the new render content to.

Return Value

Type: RenderContent
A new document-resident render content.
See Also