Rhino C++ API
8.10
|
#include <RhRdkContent.h>
Classes | |
class | CChildIterator |
class | CChildSlotIterator |
class | CCustomUserDataFactory |
class | Change |
class | CRenderCRCFlags |
class | DumpContext |
class | ICustomUserData |
class | TextureChannelInfo |
class | unique_ptr |
Public Member Functions | |
CRhRdkContent () | |
CRhRdkContent (bool bAutoGlobalRegister) | |
virtual | ~CRhRdkContent () |
virtual RDK_DEPRECATED void | AddAutoParameters (class IRhRdkParamBlock ¶mBlock, int id) |
virtual void | AddAutoParameters (class IRhRdkParamBlock ¶mBlock, int id) const |
virtual RDK_DEPRECATED bool | AddChild (CRhRdkContent *pChild, const wchar_t *wszChildSlotName) |
virtual bool | AddToDocumentList (CRhRdkDocument &rdkDoc) |
virtual void | AddUI (IRhRdkContentUI &ui) const =0 |
virtual const class IRhRdkPreviewAppearanceDefaults * | AppearanceDefaults (void) const |
virtual bool | AttachCustomUserData (ICustomUserData *data) |
virtual bool | AutoDelete (void) const |
virtual ON_wString | AutomaticInstanceName (void) const |
virtual CRhRdkContent & | BeginChange (RhRdkChangeContext cc) const |
virtual unsigned int | BitFlags (void) const |
virtual bool | CanBeEdited (void) const |
virtual const wchar_t * | Category (void) const =0 |
virtual bool | ChangeChild (CRhRdkContent *pOldChild, CRhRdkContent *pNewChild) |
virtual RDK_DEPRECATED void | Changed (eChangeContext cc) |
virtual void | Changed (void) |
bool | CheckComplete (ON_wString &sReason) const |
virtual RDK_DEPRECATED DWORD | ChildrenRenderCRC (void) const |
virtual CRhRdkVariant | ChildSlotAmount (const wchar_t *wszChildSlotName) const |
ON_wString | ChildSlotDisplayName (void) const |
virtual ON_wString | ChildSlotName (void) const |
virtual ON_wString | ChildSlotNameFromParamName (const wchar_t *wszParamName) const |
virtual CRhRdkVariant | ChildSlotOn (const wchar_t *wszChildSlotName) const |
CRhRdkContent * | Clone (CopyMethods m=CopyMethods::Normal) const |
void | CommonCtor (bool b) |
virtual bool | ContentNameTakenFromFileName (void) const |
virtual void | ConvertMetersToUnits (void) |
virtual void | ConvertUnitsToMeters (void) |
virtual bool | CreatedByLoading (void) const |
virtual RDK_DEPRECATED HBITMAP | CreateLibraryPreview (const class CSize &sizeImage, const IRhRdkPreviewSceneServer *pSceneServer) const |
virtual bool | CreateLibraryPreview (const ON_2iSize &sizeImage, const IRhRdkPreviewSceneServer *pSceneServer, CRhinoDib &dibOut) const |
virtual RDK_DEPRECATED HBITMAP | CreatePreview (class CRhRdkRenderPlugIn &plugIn, const class CSize &sizeImage, eRhRdkRenderQuality qual, const class IRhRdkPreviewSceneServer *pSceneServer) const |
virtual bool | CreatePreview (CRhRdkRenderPlugIn &plugIn, const ON_2iSize &sizeImage, RhRdkPreviewQuality qual, const IRhRdkPreviewSceneServer *pSceneServer, class IRhRdkPreviewCallbacks *pNotify, CRhinoDib &dibOut) const =0 |
virtual class IRhRdkContentUI * | CreateUI (class IRhRdkContentEditor &e, const UUID &uuidUI, const class CRhRdkContentArray &aInitialClients, void *pReserved)=0 |
virtual const ICustomUserData * | CustomUserData (const UUID &uuidDataId) const |
virtual RDK_DEPRECATED void | DecrementUseCount (void) const |
virtual void | DeleteAllChildren (void) |
virtual bool | DeleteChild (const wchar_t *wszChildSlotName) |
virtual RDK_DEPRECATED void | DestroyChildContent (const UUID &uuidPlugIn) |
virtual void | DestroyChildContent (const UUID &uuidPlugIn) const |
virtual bool | DetachCustomUserData (ICustomUserData *pUD) |
virtual void | DisplayContextHelp (HWND hwndParent) const |
virtual void | DisplayDebugString (const wchar_t *wszTitle=L"") const |
ON_wString | DisplayName (void) const |
virtual RDK_DEPRECATED CRhinoDoc * | Document (void) const |
CRhinoDoc * | DocumentAssoc (void) |
virtual const CRhinoDoc * | DocumentAssoc (void) const |
virtual ON_wString | DragText (const UUID &uuidSource) const |
ON_wString | DragTextEx (const UUID &uuidSource, int version, void *) const |
void | Dump (const DumpContext &dc, unsigned int gds_flags, int indent=0) const |
virtual const RDK_DEPRECATED CRhRdkContent * | Duplicate (void) const |
const RDK_DEPRECATED CRhRdkContent * | DuplicateEx (bool reserved) const |
const CRhRdkContent * | DuplicateEx (DupOpt d) const |
virtual IAutoUIExtraRequirements * | DuplicateExtraRequirementsInterface (void) const |
virtual bool | DuplicationInProgress (void) const |
virtual bool | DynamicIcon (const ON_2iSize &size, CRhinoDib &dibOut, DynamicIconUsage usage) const =0 |
virtual CRhRdkContent * | Edit (void) const |
virtual ON_wString | EmbeddedFiles (void) const |
virtual ON_wString | EmbeddedFilesRecursive (void) const |
void | EmergencyUnregister (void) const |
virtual bool | EndChange (void) |
virtual void * | EVF (const wchar_t *wszFunc, void *pvData) |
virtual void | ExecuteCommand (UUID uuidCommand, void *pvData) const |
virtual const CRhRdkContentFactory * | Factory (void) const |
virtual CRhRdkContent * | FastMakeCopy (CopyMethods m) const |
class CRhRdkContentFields & | Fields (void) const |
virtual const CRhRdkContent * | FindChild (const wchar_t *wszChildSlotName) const |
virtual const CRhRdkContent * | FindInstance (const UUID &uuidInstance) const |
virtual RDK_DEPRECATED CRhRdkContent * | FindInstance (const wchar_t *wszName) const |
virtual void | FindInstanceByName (const wchar_t *wszName, bool bCaseSensitive, bool bRecurse, OUT CRhRdkContentArray &aContent) const |
virtual const CRhRdkContent * | FirstChild (void) const |
virtual const CRhRdkContent * | ForDisplay (void) const |
virtual void | GetAutoParameters (const IRhRdkParamBlock ¶mBlock, int id) |
virtual RhRdkChangeContext | GetChangeContext (void) const |
virtual CChildIterator | GetChildIterator (void) const |
virtual ON_wString | GetDebugString (const wchar_t *sep, UINT_PTR flags) const |
virtual RDK_DEPRECATED bool | GetDefaultsFromUser (HWND) |
virtual bool | GetDefaultsFromUser (void) |
virtual ON_wString | GetEnglishParamName (const wchar_t *wszParamName) const |
virtual bool | GetExtraRequirementParameter (const wchar_t *wszParamName, const wchar_t *wszExtraReqName, CRhRdkVariant &vValueOut) const |
virtual void | GetInstanceIdsRecursive (class CRhRdkInstanceIdArray &aOut) const |
virtual ON_wString | GetLocalizedParamName (const wchar_t *wszParamName) const |
virtual CRhRdkVariant | GetParameter (const wchar_t *wszName) const |
virtual RDK_DEPRECATED bool | GetParameters (const class IRhRdk_XMLSection §ion, eGetParamsContext context) |
virtual void * | GetShader (const UUID &uuidRenderEngine, void *pvData) const |
virtual bool | GetSimulation (const IRhRdk_XMLSection §ion) |
void | GetSortedChildren (OUT CRhRdkContentArray &aChild) const |
virtual void | GetUIs (ON_SimpleArray< IRhRdkContentUI * > &aOut) const =0 |
bool | GetUnderlyingInstances (OUT CRhRdkContentArray &a) const |
virtual bool | GlobalRegister (bool bRegister=true) |
virtual const UUID & | GroupId (void) const |
virtual Harvested | HarvestData (const CRhRdkContent &oldContent)=0 |
virtual bool | Icon (const ON_2iSize &size, CRhinoDib &dibOut) const =0 |
virtual RDK_DEPRECATED HICON | Icon (void) const |
CImpl & | Imp (void) const |
virtual RDK_DEPRECATED void | IncrementUseCount (void) const |
virtual bool | Initialize (void) |
virtual const UUID & | InstanceId (void) const |
virtual ON_wString | InstanceName (void) const |
virtual void | InternalChanged (RhRdkChangeContext, const CRhRdkContent *) |
virtual ON_wString | InternalName (void) const =0 |
virtual bool | IsBasicType (void) const |
virtual bool | IsBuiltIn (void) const |
bool | IsChild (void) const |
virtual bool | IsCompatible (const UUID &uuidRenderEngine) const |
virtual bool | IsContentTypeAcceptableAsChild (const UUID &uuidType, const wchar_t *wszChildSlotName) const |
virtual RDK_DEPRECATED bool | IsCRCCached (void) const |
virtual bool | IsDefaultInstance (void) const |
virtual bool | IsFactoryProductAcceptableAsChild (const class CRhRdkContentFactory &f, const wchar_t *wszChildSlotName) const |
virtual RDK_DEPRECATED bool | IsFactoryProductAcceptableAsChild (const class CRhRdkContentFactory *pFactory, const wchar_t *wszChildSlotName) const |
virtual bool | IsHidden (void) const |
virtual bool | IsHiddenByAutoDelete (void) const |
virtual RDK_DEPRECATED bool | IsInDocument (void) const |
virtual bool | IsKind (CRhRdkContent::Kinds kind) const |
virtual bool | IsLocked (void) const |
virtual bool | IsOwnedByDocument (void) const |
virtual bool | IsPerObject (void) const |
virtual bool | IsPrivate (void) const |
virtual bool | IsReference (void) const |
virtual bool | IsRhinoObjectSelected (void) const |
virtual bool | IsSurrogate (void) const |
virtual bool | IsTopLevel (void) const |
virtual bool | IsUniversal (void) const |
virtual bool | IsV4Material (void) const |
virtual Kinds | Kind (void) const =0 |
virtual const wchar_t * | LibraryFileExtension (void) const =0 |
virtual ON_wString | LibraryFileName (void) const |
virtual CRhRdkContent * | MakeCopy (CopyMethods m=CopyMethods::Normal) const |
CRhRdkContent * | MakeCopyForPreview (void) const |
virtual RDK_DEPRECATED CRhRdkContent * | MakeGroupInstance (void) |
virtual CRhRdkContent * | MakeGroupInstance (void) const |
virtual CChildSlotIterator * | NewChildSlotIterator (CSIContext context) const |
virtual class CRhRdkPreviewBackground * | NewPreviewBackground (void) const =0 |
virtual class CRhRdkPreviewGeometry * | NewPreviewGeometry (void) const =0 |
virtual class IRhRdkPreviewSceneServer * | NewPreviewSceneServer (const class CRhRdkSSData &data) const =0 |
virtual const CRhRdkContent * | NextSibling (void) const |
virtual ON_wString | Notes (void) const |
virtual bool | OnChildChanging (const CRhRdkContent *pOldChild, const CRhRdkContent *pNewChild) const |
virtual bool | OnChildSlotChanged (const wchar_t *wszChildSlotName) const |
virtual bool | OnChildSlotChanging (const wchar_t *wszChildSlotName) const |
virtual void | OnDocumentRegister (void) const |
virtual void | OnDocumentUnregister (void) const |
virtual bool | OnExtraRequirementButtonClicked (const wchar_t *wszParamName, const wchar_t *wszButtonName) |
virtual void | OnFieldChanged (const class CRhRdkContentField &field, const CRhRdkVariant &vOldValue, RhRdkChangeContext cc, void *pReserved) |
bool | OpenInFirstMainModelessEditor (void) const |
virtual bool | OpenInMainEditor (void) const |
virtual RDK_DEPRECATED bool | OpenInModalEditor (UINT uFlags=0) |
virtual ParamSerialMethod | ParameterSerializationMethod (void) const =0 |
virtual ON_wString | ParamNameFromChildSlotName (const wchar_t *wszChildSlotName) const |
virtual const CRhRdkContent * | Parent (void) const |
virtual UUID | PlugInId (void) const =0 |
virtual UINT | PreviewBackgroundFlags (void) const =0 |
virtual UINT | PreviewGeometryFlags (void) const =0 |
virtual UINT | PreviewLightingFlags (void) const =0 |
virtual ePreviewSceneType | PreviewSceneType (void) const =0 |
virtual int | PreviewUpdateDelay (void) const |
void | Promote (void) |
virtual ProxyTypes | ProxyType (void) const |
virtual const CRhRdkDocument * | RdkDocumentAssoc (void) const |
virtual UUID | RdkDocumentId (void) const |
virtual const CRhRdkDocument * | RdkDocumentOwner (void) const |
virtual const RDK_DEPRECATED CRhRdkDocument * | RdkDocumentRegistered (void) const |
virtual bool | ReadParametersFromSection (const IRhRdk_XMLSection §ion, ReadParamsContext context) |
virtual RDK_DEPRECATED bool | ReadParameterXMLStream (const wchar_t *wszStream, eGetParamsContext context) |
virtual bool | ReadParameterXMLStream (const wchar_t *wszStream, ReadParamsContext context) |
virtual bool | ReadSimulationXMLStream (wchar_t *wszStream) |
RDK_DEPRECATED bool | ReadXMLStream (const wchar_t *wszStream) |
virtual bool | ReadXMLStream (const wchar_t *wszStream, const CRhinoFileReadOptions *pOptions) |
virtual void | ReleaseAllEditorUIs (const UUID &uuidEditor, bool bIncludeChildren) const =0 |
virtual void | ReleaseAllUIs (bool bIncludeChildren) const =0 |
virtual bool | RemoveFromDocumentList (CRhRdkDocument &rdkDoc) |
virtual bool | RemoveRdkDocumentAssoc (void) |
virtual unsigned int | RenderCRC (const CRenderCRCFlags &rcrcFlags) const |
RDK_DEPRECATED unsigned int | RenderCRC (const CRenderCRCFlags &rcrcFlags, const IRhRdkLinearWorkflow &lw) const |
unsigned int | RenderCRC (const CRenderCRCFlags &rcrcFlags, const ON_LinearWorkflow &lw) const |
virtual UUID | RenderEngineId (void) const =0 |
virtual void | ResetParametersToDefaults (const ON_ClassArray< ON_wString > &aParams) |
virtual RDK_DEPRECATED void | ResetUseCount (void) const |
virtual void | ResolveRelativePaths (const wchar_t *wszPathToFile) |
virtual void | ResolveURLPaths (bool bForceDownload=false) |
ON_wString | SavedCSN (void) const |
virtual RDK_DEPRECATED bool | SaveToLibraryFile (const ON_wString &sFullPath, const IRhRdkPreviewSceneServer *pSceneServer) const |
virtual bool | SaveToLibraryFile (const ON_wString &sFullPath, const IRhRdkPreviewSceneServer *pSceneServer, EmbedFilesChoice c) const |
virtual bool | SaveToLibraryFile_Internal (const wchar_t *wszFullPath, const IRhRdkPreviewSceneServer *pSceneServer, bool bEmbedFiles) const |
virtual void | SetAutoDelete (bool bAutoDelete) |
virtual bool | SetChild (const CRhRdkContent *pChild, const wchar_t *wszChildSlotName) |
virtual bool | SetChildSlotAmount (const wchar_t *wszChildSlotName, double dPercent) |
virtual void | SetChildSlotName (const wchar_t *wszChildSlotName) |
virtual bool | SetChildSlotOn (const wchar_t *wszChildSlotName, bool bOn) |
virtual RDK_DEPRECATED void | SetCRCCache (DWORD dwCRC) const |
virtual bool | SetDocumentAssoc (const CRhinoDoc &doc) const |
bool | SetDocumentAssoc (const CRhRdkContent &) const |
virtual bool | SetExtraRequirementParameter (const wchar_t *wszParamName, const wchar_t *wszExtraReqName, const CRhRdkVariant &vValue, SetContext sc) |
virtual void | SetGroupId (const UUID &uuidGroup) const |
virtual void | SetHidden (bool bHidden) |
RDK_DEPRECATED void | SetHidden (bool bHidden, eChangeContext cc) |
virtual void | SetInstanceId (UUID uuidInstance) |
virtual void | SetInstanceName (const wchar_t *wszName) |
void | SetInstanceName (const wchar_t *wszName, bool bRenameEvents, bool bEnsureNameUnique) |
virtual void | SetInstanceNameImpl (const wchar_t *wszName, bool bRenameEvents) |
void | SetInstanceNameImpl (const wchar_t *wszName, bool bRenameEvents, bool bEnsureNameUnique) |
virtual RDK_DEPRECATED void | SetIsReference (bool b) |
void | SetIsRenderCRCRecursive (bool bRecursive) |
virtual void | SetIsRhinoObjectSelected (bool bSelected) const |
virtual void | SetLocked (void) |
virtual void | SetNotes (const wchar_t *wszNotes) |
RDK_DEPRECATED void | SetNotes (const wchar_t *wszNotes, bool bSendEvents) |
virtual bool | SetParameter (const wchar_t *wszName, const CRhRdkVariant &vValue) |
virtual RDK_DEPRECATED bool | SetParameter (const wchar_t *wszName, const CRhRdkVariant &vValue, eChangeContext cc) |
virtual RDK_DEPRECATED bool | SetParameters (class IRhRdk_XMLSection §ion, eSetParamsContext context) const |
virtual bool | SetRdkDocumentAssoc (const CRhRdkDocument &rdkDoc) |
virtual bool | SetRdkDocumentOwner (CRhRdkDocument *pRdkDoc) |
virtual bool | SetSimulation (IRhRdk_XMLSection §ion) const |
virtual void | SetTags (const wchar_t *wszTags, bool bSendEvents=true) |
virtual bool | SmartUngroupRecursive (void) |
virtual bool | SupportsCommand (UUID uuidCommand) const |
virtual bool | SupportsContextHelp (void) const |
virtual ON_wString | Tags (void) const |
ON_RenderContent * | ToON_RenderContent (bool bRecursive=true) const |
virtual CRhRdkContent & | TopLevel (void) |
virtual const CRhRdkContent & | TopLevel (void) const |
virtual CRhRdkContent * | TopLevelParent (void) |
virtual const CRhRdkContent * | TopLevelParent (void) const |
virtual void | TransferUIsFrom (const CRhRdkContent &c)=0 |
virtual ON_wString | TypeDescription (void) const =0 |
virtual UUID | TypeId (void) const =0 |
virtual ON_wString | TypeName (void) const =0 |
virtual RDK_DEPRECATED class IRhRdkExpandableContentUI * | UI (void) const =0 |
virtual RDK_DEPRECATED bool | Ungroup (void) |
virtual bool | Ungroup (void) const |
virtual RDK_DEPRECATED bool | UngroupRecursive (void) |
virtual bool | UngroupRecursive (void) const |
virtual void | Uninitialize (void) |
virtual bool | UpdateDocumentTables (void) const =0 |
virtual void | UpdatePreview (void) const |
virtual RDK_DEPRECATED void | UpdateUI (void) const |
virtual int | UseCount (void) const |
virtual void | VerifyCopy (const CRhRdkContent *pCopy) const |
virtual RDK_DEPRECATED const class IRhRdkThumbViewDefaults * | ViewDefaults (void) const |
virtual bool | WriteParametersToSection (IRhRdk_XMLSection §ion, WriteParamsContext context) const |
virtual RDK_DEPRECATED DWORD | WriteParameterXMLStream (wchar_t *wszStream, DWORD dwMaxChars, eSetParamsContext context) const |
virtual size_t | WriteParameterXMLStream (wchar_t *wszStream, size_t maxChars, WriteParamsContext context) const |
virtual size_t | WriteSimulationXMLStream (wchar_t *wszStream, size_t maxChars) const |
virtual RDK_DEPRECATED DWORD | WriteXMLStream (wchar_t *wszStream, DWORD dwMaxChars, eSetParamsContext context) const |
virtual size_t | WriteXMLStream (wchar_t *wszStream, size_t maxChars, WriteParamsContext context, const CRhinoFileWriteOptions *pOptions) const |
![]() | |
CRhRdkObject () | |
virtual | ~CRhRdkObject () |
void | operator delete (void *buf) |
void | operator delete[] (void *buf) |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
![]() | |
virtual | ~IAutoUIExtraRequirements () |
Static Public Member Functions | |
static RhRdkChangeContext | ChangeContextFromSetContext (SetContext sc) |
static RDK_DEPRECATED CRhRdkContent * | CreateObjectFromType (UUID uuidType) |
static CRhRdkContent * | FromON_RenderContent (const class ON_RenderContent &rc, const CRhinoDoc *pDocAssoc, bool bRecursive) |
static RDK_DEPRECATED CRhRdkContent * | FromXMLStream (const wchar_t *wszXML) |
static RDK_DEPRECATED CRhRdkContent * | FromXMLStream (const wchar_t *wszXML, const CRhinoDoc *pDocAssoc) |
static CRhRdkContent * | FromXMLStream (const wchar_t *wszXML, const CRhinoDoc *pDocAssoc, bool bUseXMLInstanceId) |
static bool | IsChangeContextUIBased (RhRdkChangeContext cc) |
static SetContext | SetContextFromChangeContext (RhRdkChangeContext cc) |
static void | UninitializeAndDelete (CRhRdkContent *pContent) |
![]() | |
static void | CheckMemory (void) |
static void | PopulateDebuggingInfo (void) |
Protected Member Functions | |
virtual unsigned int | ComputeRenderCRC (const CRenderCRCFlags &rcrcFlags) const |
Abstract base class for all kinds of render content. A 'render content' (AKA 'content') is a material, environment or texture used for rendering.
Contents have a unique type id which is the same for all instances of the same class and an instance id which is unique for each instance. They know how to provide a shader for rendering, how to read and write their state as XML and how to create their own user interfaces.
There are two flavors of content in the RDK – temporary and persistent. It is very important to understand the distinction between a temporary content instance and a persistent content instance, and the fact that a temporary instance (and all its children) can become persistent. Persistent content is registered with a document and is usually (but not always) owned by it.
Temporary contents get created and deleted very often during the normal operation of the RDK. In fact, just about anything the user clicks on might result in a temporary content being created and deleted again. They are created by the content browser, the thumbnail rendering, and so on. They are 'free floating' and are owned by whomever created them. They do not appear in the modeless UI, they do not get saved in the 3dm file, and they can freely be deleted again after use.
Contrast this with persistent contents which are attached to a document. They are always owned by RDK, appear in the modeless UI and get saved in the 3dm file. Pointers to persistent contents should never be stored by clients; you should only store their instance ids and look them up again using CRhRdkDocument::FindContentInstance(). They can be deleted only after detaching them from the document.
CRhRdkDocument::CreateContentByType() is the highest-level function for creating a content. It creates it, initializes it, adds it to the document and sends many events. It even records undo. You cannot call this method from just anywhere. It must only be called by 'UI code'; scripts or buttons on a dialog. It results in a persistent (usually top-level) content being attached to the document and appearing in all the RDK UI elements that display contents, like the thumbnail and tree views. If you call this method and specify a parent and child-slot name, your new content will be attached to the document-resident parent as a child and the UI will be updated accordingly.
If you want to create a complex content that has children from the moment it is created, you can add the children in Initialize(). You want to create a temporary child content that is not attached to any document and after that you want to attach it to your parent content – which RDK is about to attach to a document. The sequence of operation is:
The important point is that everything is temporary while the content structure is being built. Only after the whole structure is complete will the top-level parent be attached to the document making the whole structure persistent.
anonymous enum : unsigned int |
Bit-flags returned by BitFlags()
Enumerator | |
---|---|
bfTextureSummary | |
bfQuickPreview | |
bfPreviewCache | |
bfLocalTextureMapping | |
bfGraphDisplay | |
bfAdjustment | |
bfFields | |
bfNameTypeSection |
anonymous enum |
anonymous enum |
anonymous enum |
|
strong |
|
strong |
|
strong |
Duplicate the content. The exact behavior depends on the document status of the content and the value of the DupOpt enum passed as parameter 'd'.
Enumerator | |
---|---|
Attach | |
NoAttach |
|
strong |
Used by DynamicIcon()
Enumerator | |
---|---|
TreeControl | |
SubnodeControl | |
ContentControl | |
General |
|
strong |
Used by SaveToLibraryFile()
Enumerator | |
---|---|
kNeverEmbed | |
kAlwaysEmbed | |
kAskUser |
enum CRhRdkContent::GDS_Flags : UINT_PTR |
|
strong |
|
strong |
|
strong |
|
strong |
Enumerator | |
---|---|
None | |
Single | |
Multi | |
Texture |
|
strong |
Context for ReadParametersFromSection() and ReadParameterXMLStream().
Enumerator | |
---|---|
Serialization | |
Harvesting | |
Rendering |
|
strong |
Context for WriteParametersToSection(), WriteXMLStream() and WriteParameterXMLStream().
Enumerator | |
---|---|
Serialization | |
Harvesting | |
Rendering | |
DragDrop |
CRhRdkContent::CRhRdkContent | ( | ) |
This constructor automatically registers the content in the global content registry.
CRhRdkContent::CRhRdkContent | ( | bool | bAutoGlobalRegister | ) |
bAutoGlobalRegister | specifies if the content should automatically be registered in the global content registry. |
|
virtual |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Optionally override this method to add the content's parameters to a collection. You need to override this method if you are using the automatic UI system and also if your content supports the texture summary.
paramBlock | is the collection. |
id | is a caller-defined identifier (can be zero if not needed). Values of 0x8000 and above are reserved for RDK internal use. |
Reimplemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.
|
virtual |
This method is deprecated in favor of SetChild()
|
virtual |
|
pure virtual |
Implemented in CRhRdkCoreContent.
|
virtual |
Provides defaults for a preview appearance. The default implementation usually returns null, but it can return an object when loading an RMTL file. Because of this, your override should call the base class first and if the result is not null, it should return the base class object. Otherwise, you may provide different defaults than the saved or hard coded defaults for the content kind.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
Begins a change or batch of changes. This returns a non-const reference to this content which you should use to make your changes. It may also make a copy of the content state allowing 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(). Please do not use const_cast or any other means of circumventing this requirement.
cc | is the change context. If this is UI, Program, Drop or Tree, the content will be copied. EndChange() will then send the copy as 'old' in the OnContentChanged event. |
|
virtual |
Optionally override this method to modify the content's bit-flags. You should first call the base class and then modify the resulting value before finally returning it. This will ensure that you get the correct default behavior before modifying it.
Reimplemented in CRhRdkBasicMaterial, CRhRdkOneColorTextureBase, and CRhRdkTexture.
|
virtual |
|
pure virtual |
Implemented in CRhRdkBasicMaterial, CRhRdkMaterial, and CRhRdkEnvironment.
|
virtual |
This is an advanced override for expert use only. It is only called by RDK when deleting a child. You can override it to detect when RDK is deleting a child of this content.
|
static |
Convert IAutoUIExtraRequirements::SetContext to RhRdkChangeContext.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Called when the state of the content is changed. If your content subclass implements a member variable that affects rendering and/or appears in the content's user interface, then you should call this method from your Set... method when the Set... method detects a change to the value of the member. Optionally override this method to perform further actions when the content changes. Please be sure to call the base class.
bool CRhRdkContent::CheckComplete | ( | ON_wString & | sReason | ) | const |
sReason | is a localized string giving the reason why the content is incomplete (if so). This optional parameter is only filled in if the method returns false. |
|
virtual |
This method is deprecated and no longer called. For more information
|
virtual |
Get the amount of the specified child slot in the range 0 to 100.
wszChildSlotName | is the child slot to get the amount for. |
ON_wString CRhRdkContent::ChildSlotDisplayName | ( | void | ) | const |
|
virtual |
|
virtual |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
Get the 'on' state of the specified child slot.
wszChildSlotName | is the child slot to get the state of. |
CRhRdkContent* CRhRdkContent::Clone | ( | CopyMethods | m = CopyMethods::Normal | ) | const |
Internally this method calls MakeCopy().
void CRhRdkContent::CommonCtor | ( | bool | b | ) |
|
protectedvirtual |
Calculate the render CRC of the state that affects how the content is rendered. Does not include children or perform any caching. Render CRCs 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 recursing into children. This method is now only called internally by the RDK. If you have existing code that calls it (or CalculateRenderCRC()), please change your code to call RenderCRC() instead. RenderCRC() is the method that manages the cache and recursion by calling this method as needed. If you override this method and implement your own CRC function, you only have to compute the CRC of this content alone. This removes the need for the methods ChildrenRenderCRC(), IsCRCCached() and SetCRCCache(). These methods are now deprecated and never called.
Reimplemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.
|
virtual |
|
virtual |
Reimplemented in CRhRdkTexture.
|
virtual |
Reimplemented in CRhRdkTexture.
|
virtual |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Create a preview bitmap for use when saving the content to the content library.
sizeImage | The size of the image to render. |
pSceneServer | A scene server that defines the scene for the preview rendering. This parameter will be null if the content is a texture. |
dibOut | accepts the rendered preview if the method returns true. |
Reimplemented in CRhRdkTexture.
|
static |
DEPRECATED. Call RhRdkContentFactories().NewContentFromTypeEx() instead.
|
virtual |
This method is deprecated in favor of the one below.
|
pure virtual |
Create a preview of the content for use in the content editor thumbnail display.
plugIn | The render plug-in to use to render the preview. |
sizeImage | The size of the image to render. |
qual | The quality of the preview. |
pSceneServer | A scene server that defines the scene for the preview rendering. |
dibOut | accepts the rendered preview if the method returns true. |
Implemented in CRhRdkCoreContent, and CRhRdkTexture.
|
pure virtual |
Used by the RDK content editor to create the content's UI. This UI allows editing of the content's persistent state. The implementation in CRhRdkCoreContent should suit most clients.
|
virtual |
|
virtual |
Obsolete. Not implemented.
|
virtual |
Deletes all the children of this content. This method sends events and records undo.
|
virtual |
Delete a child by its child slot name. If the child is part of a document-resident content hierarchy, an undo record will be created, the child will be detached from the hierarchy and deleted, and the necessary events will be sent to update the UI. If the child is part of a non-document-resident content hierarchy, it will simply be deleted.
wszChildSlotName | is the child slot name of the child to delete. |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Destroys all child content belonging to the specified plug-in. RDK calls this internally. Clients should not call this method. This is an advanced override which clients can use to detect when all child content of a plug-in is being deleted by RDK. This happens when the plug-in is unloaded.
|
virtual |
|
virtual |
Displays context-sensitive help.
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
Display debugging information in the debug output window.
ON_wString CRhRdkContent::DisplayName | ( | void | ) | const |
|
virtual |
CRhinoDoc* CRhRdkContent::DocumentAssoc | ( | void | ) |
|
virtual |
Get the document that this content hierarchy is associated with, if any. This can be called on top-level or child contents and will return the document that the top-level parent is associated with, if any.
|
virtual |
ON_wString CRhRdkContent::DragTextEx | ( | const UUID & | uuidSource, |
int | version, | ||
void * | |||
) | const |
void CRhRdkContent::Dump | ( | const DumpContext & | dc, |
unsigned int | gds_flags, | ||
int | indent = 0 |
||
) | const |
Dump the content state to a 'dump context'.
gds_flags | is a flag word (see GetDebugString() for details). |
indent | is an indent amount for formatting. |
|
virtual |
Please call DuplicateEx(DupOpt) instead.
const RDK_DEPRECATED CRhRdkContent* CRhRdkContent::DuplicateEx | ( | bool | reserved | ) | const |
Please call DuplicateEx(DupOpt) instead.
const CRhRdkContent* CRhRdkContent::DuplicateEx | ( | DupOpt | d | ) | const |
|
virtual |
This is an advanced method which you should never need to override.
Implements IAutoUIExtraRequirements.
|
virtual |
|
pure virtual |
Creates imagery (AKA an 'icon') to represent the content's appearance. This imagery is dynamic, i.e., it changes depending on the content's state (parameters). It is similar to a quick preview and may be implemented in a similar way to CreatePreview().
size | is the desired physical size of the imagery, in pixels. |
dibOut | is a DIB that accepts the created imagery. |
usage | specifies how the icon will be used. |
Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.
|
virtual |
This method allows a content hierarchy to be edited using a modal (AKA 'pop-up') editor. Overriding this method allows the content provider to implement their own editing procedure. The default implementation uses the standard RDK modal editor which after successful editing will return an edited version of the entire hierarchy. If the original 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. To edit multiple contents, please see RhRdkModalEditContent().
Example usage:
You can also replace a document content with an edited version of it.
|
virtual |
|
virtual |
void CRhRdkContent::EmergencyUnregister | ( | void | ) | const |
|
virtual |
Ends a change or batch of changes. Calls to this method are counted; you must call EndChange() once for every call to BeginChange().
|
virtual |
Emergency virtual function for future expansion. If you override this method, you must call the base class.
Implements IAutoUIExtraRequirements.
Reimplemented in CRhRdkTexture, CRhRdkMaterial, CRhRdkCoreContent, and CRhRdkEnvironment.
|
virtual |
Executes a command.
uuidCommand | is the UUID of the command. |
pvData | is a pointer to command-specific data. |
|
virtual |
|
virtual |
Faster version of MakeCopy(). You can call this if you are willing to implement copying for your content's state. This method takes care of copying base state, any fields, and children. If your content uses fields exclusively to store its state, you need to do nothing else after calling it (but see VerifyCopy() below). An example use would be to override the MakeCopy() function as follows:
const CRhRdkContent* CMyContent::MakeCopy(CopyMethods m) const { CMyContent* pCopy = static_cast<CMyContent*>(FastMakeCopy(m)); if (nullptr != pCopy) { // Do any extra member copying here. #ifdef _DEBUG VerifyCopy(pCopy); // Asserts that FastMakeCopy() and MakeCopy() give the same render CRC. #endif } // IMPORTANT: Do not call the base class. return pCopy; }
Reimplemented in CRhRdkMaterial.
class CRhRdkContentFields& CRhRdkContent::Fields | ( | void | ) | const |
Get the content fields.
|
virtual |
|
virtual |
Searches for the content with the specified instance id. Looks at itself and all children recursively.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Searches the content hierarchy for contents with the specified instance name.
wszName | is the name to search for. |
bCaseSensitive | specifies if the name check is case-sensitive or not. |
bRecurse | specifies if the content's children should be searched. |
aContent | accepts all the contents that satisfy the search. |
|
virtual |
|
virtual |
|
static |
Creates a new CRhRdkContent derived object from an ON_RenderContent.
|
static |
|
static |
|
static |
Creates a new CRhRdkContent derived object from an XML stream.
|
virtual |
Optionally override this method to get the content's parameters from a collection. You need to override this method if you are using the automatic UI system and also if your content supports the texture summary.
paramBlock | is the collection. |
id | is a caller-defined identifier (can be zero if not needed). Values of 0x8000 and above are reserved for RDK internal use. |
Reimplemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.
|
virtual |
Gets the change context that was passed to BeginChange().
|
virtual |
|
virtual |
Get debugging information as a string.
sep | is a separator (e.g., L", " or L"\n"). |
flags | is a flag word (see above). |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Override this to get defaults from the user when the content is created. Only used by contents that need special defaults that must be chosen by the user. The default implementation is a no-op that returns true.
|
virtual |
Optionally override this method to return the user-friendly English name of a particular parameter. The default implementation tries to get the name from a field with that name. If it fails, it generates a name based on the parameter name and displays a warning in the debugger output window: "GetEnglishParamName() generated...". This warning is an indication that you need to override this method and return an English string for the given parameter name.
wszParamName | is the name of the parameter for which the localized string is required. |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
Optionally override this method to get a parameter for extra UI requirements. Please be sure to call the base class.
wszParamName | The name of the content parameter for which to get an extra requirement parameter. |
wszExtraReqName | The name of the extra requirement parameter to retrieve. |
vValueOut | Receives the parameter's value. |
Implements IAutoUIExtraRequirements.
Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, and CRhRdkOneColorTextureBase.
|
virtual |
Gets the unique instance id of this instance and all its children.
aOut | is an array that accepts the instance ids. |
|
virtual |
Optionally override this method to return the user-friendly localized name of a particular parameter. The default implementation tries to get the name from a field with that name. If it fails, it generates a name based on the parameter name and displays a warning in the debugger output window: "GetLocalizedParamName() generated...". This warning is an indication that you need to override this method and return a localized string for the given parameter name.
wszParamName | is the name of the parameter for which the localized string is required. |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
Optionally override this method to get a specific parameter from the content. Use of content fields causes this method to be automatically implemented. The default implementation checks if fields are in use and if so, it returns the field value.
Reimplemented in CRhRdkBasicMaterial, and CRhRdkTexture.
|
virtual |
This method is deprecated in favor of ReadParametersFromSection().
|
virtual |
Implement this method to return a pointer to your renderer's shader object for this content.
uuidRenderEngine | is the render engine id of the caller. |
pvData | is a pointer to any necessary private data, or null if not required. |
Reimplemented in CRhRdkOneColorTextureBase, and CRhRdkBasicMaterialBase.
|
virtual |
Optionally override this method to get the content's simulation from an XML section. This is needed if you want to avoid having to use ReadSimulationXMLStream() for serialization. For this to work you must return true. The default implementation is a no-op that returns false. This is the easiest and preferred way to serialize the simulation.
Reimplemented in CRhRdkBasicMaterial.
void CRhRdkContent::GetSortedChildren | ( | OUT CRhRdkContentArray & | aChild | ) | const |
Get an array of children sorted by their child-slot name.
|
pure virtual |
Get an array of pointers to UIs that the content is a client of.
Implemented in CRhRdkCoreContent.
bool CRhRdkContent::GetUnderlyingInstances | ( | OUT CRhRdkContentArray & | a | ) | const |
DO NOT CALL THIS FUNCTION OUTSIDE OF THE RDK CORE. This function needs to be deprecated ASAP.
|
virtual |
Register the content in the global content registry. This is an advanced method which can be called after modal editing if the content is going to be used without attaching to a document. Modally edited contents are unregistered when returned from the editor.
bRegister | is true to register the content, false to unregister it. |
|
virtual |
|
pure virtual |
Implement this to transfer data from another content to this content during creation.
oldContent | is an old content from which the implementation may harvest data. |
Implemented in CRhRdkBasicMaterial, CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.
Creates imagery (AKA an 'icon') to represent the content's type. This imagery is static, i.e., it does not change.
size | is the desired physical size of the imagery, in pixels. |
dibOut | is a DIB that accepts the created imagery. |
Implemented in CRhRdkBasicMaterial, CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.
|
virtual |
This method is deprecated in favor of the one below.
CImpl& CRhRdkContent::Imp | ( | void | ) | const |
|
virtual |
Obsolete. Not implemented.
|
virtual |
Override this to initialize your content. Please be sure to call the base class before calling any other methods in your override.
Reimplemented in CRhRdkTexture.
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
Implemented in CRhRdkBasicMaterial.
|
virtual |
Returns true if the content is one of the basic types that ship with Rhino. Basic types can be simulated without any loss of fidelity.
Reimplemented in CRhRdkBasicMaterialBase.
|
virtual |
Reimplemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.
|
static |
bool CRhRdkContent::IsChild | ( | void | ) | const |
|
virtual |
A content is compatible with a render engine when its RenderEngineId() matches the id of the render engine.
|
virtual |
|
virtual |
This method is deprecated and no longer called. For more information
|
virtual |
|
virtual |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
|
virtual |
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. This feature only works for top-level contents because it works on the entire hierarchy.
|
virtual |
This method is deprecated in favor of IsOwnedByDocument()
|
virtual |
|
virtual |
|
virtual |
Query whether or not the content hierarchy is owned by a document. Document-owned contents are considered to be 'attached' to the document that owns them.
|
virtual |
|
virtual |
A content is private if it is not intended to show in any editor. Private contents can omit support for user interfaces. Also, the registered property system ignores private contents. By default, contents are not private.
|
virtual |
Query whether or not the content or any of its ancestors is a reference content.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
A content is universal if it is meant to be used with any render engine.
|
virtual |
|
pure virtual |
Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.
|
pure virtual |
Implemented in CRhRdkMaterial, CRhRdkTexture, and CRhRdkEnvironment.
|
virtual |
|
virtual |
Copies the current content including its children.
m | is the method used to create the copy. Most (if not all) clients will use the default, 'Normal'. 'Transient' is an advanced feature used for complex internal manipulation of contents; it will rarely, if ever, be used by ordinary clients. |
Reimplemented in CRhRdkOneColorTextureBase, CRhRdkMaterial, CRhRdkBasicMaterial, and CRhRdkBasicMaterialBase.
CRhRdkContent* CRhRdkContent::MakeCopyForPreview | ( | void | ) | const |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
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.
|
virtual |
Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, and CRhRdkOneColorTextureBase.
|
pure virtual |
Implemented in CRhRdkTexture, CRhRdkMaterial, CRhRdkCoreContent, and CRhRdkEnvironment.
|
pure virtual |
Implemented in CRhRdkTexture, CRhRdkMaterial, CRhRdkCoreContent, and CRhRdkEnvironment.
|
pure virtual |
This is an advanced method which you can override in exceptional circumstances.
data | is private RDK data. For example, you could call RhRdkNew3DPreviewSceneServer() from your override to preview your content (texture) in 3D. |
|
virtual |
|
virtual |
|
virtual |
This is an advanced override for expert use only. It is called at the start of the change-child process and gives the content a chance to do something just before its child changes.
|
virtual |
Called when a child slot of the content has changed.
wszChildSlotName | is the name of the child slot that has changed. |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
Called when a child slot of the content is about to change.
wszChildSlotName | is the name of the child slot that is about to change. |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
This is an advanced override that can be used to detect if a top-level content is being registered with a document, or a child is being attached to a document-registered parent. It is called in the middle of the registration process so your override must not do anything that relies on the 'document residence' status of the content.
|
virtual |
This is an advanced override that can be used to detect if a top-level content is being unregistered from a document, or a child is being detached from a document-registered parent. It is called in the middle of the unregistration process so your override must not do anything that relies on the 'document residence' status of the content.
|
virtual |
Optionally override this method to handle an extra UI requirements button click. Please be sure to call the base class.
wszParamName | The name of the content parameter for which a button was clicked. |
wszButtonName | The name of the button that was clicked. |
Implements IAutoUIExtraRequirements.
|
virtual |
Optionally override this method to find out when a content field changes. If you override this method you must call the base class.
field | is the field that changed. |
vOldValue | is the old value of the field. |
cc | is the context of the change. |
pReserved | is reserved for future use. |
bool CRhRdkContent::OpenInFirstMainModelessEditor | ( | void | ) | const |
|
virtual |
Call this method to open the content in the main content editor. The content must be attached to a document or the method will fail. The content will be opened in the editor associated with that document (only relevant on Mac). If you override this method, please be sure to call the base class.
|
virtual |
|
pure virtual |
Implement this method to indicate which serialization method your content uses. If you return GetSet then you must implement the ReadParametersFromSection() and WriteParametersToSection() methods to serialize the parameters. If you return XmlStream then you must implement the low-level ReadParameterXMLStream() and WriteParameterXMLStream() methods to serialize the parameters.
Implemented in CRhRdkBasicMaterial, CRhRdkCoreContent, and CRhRdkTexture.
|
virtual |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
|
pure virtual |
Implemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.
|
pure virtual |
Implemented in CRhRdkTexture, CRhRdkEnvironment, and CRhRdkMaterial.
|
pure virtual |
Implemented in CRhRdkTexture, CRhRdkEnvironment, and CRhRdkMaterial.
|
pure virtual |
Implemented in CRhRdkTexture, CRhRdkEnvironment, and CRhRdkMaterial.
|
pure virtual |
This is an advanced method which you can override in exceptional circumstances.
Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.
|
virtual |
Reimplemented in CRhRdkTexture.
void CRhRdkContent::Promote | ( | void | ) |
|
virtual |
|
virtual |
|
virtual |
Get the id of the RDK document that this content hierarchy is associated with, if any. This can be called on top-level or child contents and will identify the document that the top-level parent is associated with, if any.
|
virtual |
Get the RDK document that this content hierarchy is owned by, if any. This can be called on top-level or child contents and will return the document that the top-level parent is owned by (and therefore attached to), if any.
|
virtual |
|
virtual |
Implement this method to set the content's parameters from an XML section.
section | is the section to read the parameters from. |
context | gives the reason the method is being called. |
Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, CRhRdkOneColorTextureBase, CRhRdkCoreContent, and CRhRdkTexture.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Instead of overriding ReadParametersFromSection() you can override this method to directly read the content's parameter XML from a buffer. The default implementation is a no-op that returns false.
context | gives the reason the method is being called. |
|
virtual |
Instead of overriding GetSimulation you can override this method to directly read the content's simulation XML from a buffer. The default implementation is a no-op that returns true.
RDK_DEPRECATED bool CRhRdkContent::ReadXMLStream | ( | const wchar_t * | wszStream | ) |
This method is deprecated in favor of the one below.
|
virtual |
Set the object's parameters from the supplied stream. Also causes the construction of child objects if they exist in the stream.
|
pure virtual |
For expert use only. You should never need to override this method.
Implemented in CRhRdkCoreContent.
|
pure virtual |
For expert use only. You should never need to override this method.
Implemented in CRhRdkCoreContent.
|
virtual |
|
virtual |
Remove the content hierarchy's RDK document association. This allows you to remove the document association of a content hierarchy that is not currently attached to a document. This is useful when you want to disassociate a copied content from the document it was copied from.
|
virtual |
Get the render CRC of the content hierarchy. This is an advanced override which is rarely overridden. It recurses into children and includes a caching mechanism which means the CRC can be retrieved quickly if it hasn't changed. The cache is invalidated when Changed() is called. To implement your own CRC function you should override ComputeRenderCRC(), not this method.
rcrcFlags | specifies optional flags that control the generation of the crc. |
RDK_DEPRECATED unsigned int CRhRdkContent::RenderCRC | ( | const CRenderCRCFlags & | rcrcFlags, |
const IRhRdkLinearWorkflow & | lw | ||
) | const |
This function is deprecated in favor of the one below.
unsigned int CRhRdkContent::RenderCRC | ( | const CRenderCRCFlags & | rcrcFlags, |
const ON_LinearWorkflow & | lw | ||
) | const |
Use this function to get the RenderCRC of a content when linear workflow is excluded, but you have the linear workflow information available. Typically, this will be from the change queue or another threaded application. LW must be excluded when you are running off the main thread.
|
pure virtual |
Implemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.
|
virtual |
Reset selected parameters to default values.
aParams | is an array of internal names of parameters that require resetting. |
|
virtual |
Obsolete. Not implemented.
|
virtual |
Gives the content an opportunity to find files relative to the loaded content file (RMTL etc) immediately after loading. Currently implemented through EVF "ResolveRelativePaths". There is no need to call Changed() or use Undo when modifying the content since it has not yet been processed in any way since loading. Implementation must recurse into children.
|
virtual |
ON_wString CRhRdkContent::SavedCSN | ( | void | ) | const |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Save the content to a library file.
sFullPath | is the full path to the library file to be created. |
pSceneServer | is a scene server that defines the scene for the preview rendering. |
c | is a choice for how embedded files are handled. |
|
virtual |
|
virtual |
Set if the content hierarchy should be auto-deleted when not in use.
|
virtual |
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.
pChild | is a pointer to the content to set as a child of this content. This may be null to just delete any existing child with the specified child slot name. 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. |
wszChildSlotName | is the child slot name that will be assigned to this child. The child slot name cannot be an empty string. If it is, the function will fail. |
|
virtual |
Set the amount of the specified child slot.
wszChildSlotName | is the child slot to set the amount for. |
dPercent | is the amount to set the child slot to in the range 0 to 100. |
|
virtual |
Set the child slot name of this content.
|
virtual |
Set the 'on' state of the specified child slot.
wszChildSlotName | is the child slot to set the state of. |
bOn | is the state to set the child slot to. |
|
static |
Convert RhRdkChangeContext to IAutoUIExtraRequirements::SetContext.
|
virtual |
This method is deprecated and no longer called. For more information
|
virtual |
Set the document that this content hierarchy is associated with. This allows you to set the document association of a content hierarchy that is not currently associated with or attached to a document. This is useful when you want certain document-related functions to work properly on non-document contents.
bool CRhRdkContent::SetDocumentAssoc | ( | const CRhRdkContent & | ) | const |
|
virtual |
Optionally override this method to set a parameter for extra UI requirements. Please be sure to call the base class.
wszParamName | The name of the content parameter for which to set an extra requirement parameter. |
wszExtraReqName | The name of the extra requirement parameter to be set. |
vValue | Contains the new value for the specified extra req. parameter. |
sc | The context in which the set operation is being performed. |
Implements IAutoUIExtraRequirements.
Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, and CRhRdkOneColorTextureBase.
|
virtual |
|
virtual |
Set this content as hidden or not. If hidden, it will not appear in the modeless UI. This feature only works for top-level contents because it hides the entire hierarchy. Hidden contents are never shown in the modeless UI. They can be shown in the Modal UI if deliberately edited (
RDK_DEPRECATED void CRhRdkContent::SetHidden | ( | bool | bHidden, |
eChangeContext | cc | ||
) |
This method is deprecated in favor of the one below.
|
virtual |
Set the unique instance id of this instance.
|
virtual |
Set the content's name. If the content is attached to a document, all necessary UI will be updated. This method also creates an undo record and sends the events OnContentRenaming and OnContentRenamed.
wszName | is the new name. If you override this method, please be sure to call the base class. |
Reimplemented in CRhRdkMaterial.
void CRhRdkContent::SetInstanceName | ( | const wchar_t * | wszName, |
bool | bRenameEvents, | ||
bool | bEnsureNameUnique | ||
) |
|
virtual |
void CRhRdkContent::SetInstanceNameImpl | ( | const wchar_t * | wszName, |
bool | bRenameEvents, | ||
bool | bEnsureNameUnique | ||
) |
|
virtual |
Obsolete. Not implemented.
void CRhRdkContent::SetIsRenderCRCRecursive | ( | bool | bRecursive | ) |
By default, RenderCRC() recurses into children when computing the render CRC. However, some applications may require children to be excluded from the render CRC calculation. Call this method to enable or disable recursing into children.
|
virtual |
|
virtual |
Set this content as locked. This method must only be called once, before the content is added to a document.
|
virtual |
Set the content's notes.
wszNotes | can be any text. |
RDK_DEPRECATED void CRhRdkContent::SetNotes | ( | const wchar_t * | wszNotes, |
bool | bSendEvents | ||
) |
This method is deprecated in favor of the one below.
|
virtual |
Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, CRhRdkOneColorTextureBase, and CRhRdkTexture.
|
virtual |
Optionally override this method to set a specific parameter in the content. You can use this system to change content programatically if this method is implemented for that content. If you implement this method you must return true. Use of content fields causes this method to be automatically implemented. The default implementation checks if fields are in use and if so, it sets the field value and returns true. Otherwise it returns false.
|
virtual |
This method is deprecated in favor of WriteParametersToSection().
|
virtual |
|
virtual |
Attach the content hierarchy to a document so that the document takes ownership. Contents can be attached to a document at the top level; the entire hierarchy is attached. Content hierarchies that are owned by a document are managed by that document. Content hierarchies that are not owned by a document are managed by their creator. It is therefore only legal to use 'delete' on a content when it is owned by you.
pRdkDoc | is a pointer to the document to attach the content to. If successful and pRdkDoc is not null, the content will be moved from the document it is currently in (if any) to that document. If pRdkDoc is null, the content will be removed from whatever document it is in and ownership will be transferred to the caller. |
|
virtual |
Optionally override this method to add the content's simulation to an XML section. This is needed if you want to avoid having to use WriteSimulationXMLStream() for serialization. For this to work you must return true. The default implementation is a no-op that returns false. This is the easiest and preferred way to serialize the simulation.
Reimplemented in CRhRdkBasicMaterial, CRhRdkEnvironment, CRhRdkTexture, and CRhRdkMaterial.
|
virtual |
Set the content's tags.
wszTags | is a semicolon-delimited string of tags. |
bSendEvents | is true to send events, else false. |
|
virtual |
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.
|
virtual |
Indicates whether or not the content supports a particular command.
uuidCommand | is the UUID of the command. |
|
virtual |
Reimplemented in CRhRdkBasicMaterial.
|
virtual |
ON_RenderContent* CRhRdkContent::ToON_RenderContent | ( | bool | bRecursive = true | ) | const |
Creates a new ON_RenderContent from this CRhRdkContent.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
Implemented in CRhRdkCoreContent.
|
pure virtual |
Implemented in CRhRdkBasicMaterial.
|
pure virtual |
Implemented in CRhRdkBasicMaterial.
|
pure virtual |
Implemented in CRhRdkBasicMaterial.
|
pure virtual |
This method is deprecated in favor of the one below.
Implemented in CRhRdkCoreContent.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Remove this content from any instance group it may be a member of. Does not record undo but does send the OnContentGroupIdChanged event.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
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.
|
virtual |
Override this to uninitialize your content. Please be sure to call the base class after calling any other methods in your override.
|
static |
|
pure virtual |
Called by Changed() to update Rhino document tables.
Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.
|
virtual |
Update the thumbnail preview of any thumbnail that is displaying this content. Override this to perform extra actions when the preview is updated. please be sure to call the base class.
|
virtual |
This method is deprecated in favor of the data source event system. It is no longer called.
|
virtual |
|
virtual |
Call this when your override of MakeCopy() calls FastMakeCopy().
|
virtual |
This method is deprecated in favor of AppearanceDefaults()
|
virtual |
Implement this method to get the content's parameters into an XML section.
section | is the section to write the parameters to. |
context | gives the reason the method is being called. |
Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, CRhRdkOneColorTextureBase, CRhRdkCoreContent, and CRhRdkTexture.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
<parameters>otherwise RDK won't be able to recognise it as the parameter block when reading it back in. For example:
<parameters> <amount-first type="double">1.0</amount-first> <amount-second type="double">2.0</amount-second> </parameters>
The default implementation is a no-op that returns 0.
wszStream | The buffer to be filled with XML text. Only write the text, there is no need to write a zero terminator. |
maxChars | The physical number of characters that the buffer can accomodate. |
context | gives the reason the method is being called. |
|
virtual |
Instead of overriding SetSimulation() you can override this method to directly write the content's simulation XML to a buffer. Because RDK has no way of knowing how big a buffer to allocate, this function is called twice. The first time, dwMaxChars is zero. In this case the buffer does not yet exist and you should only calculate the number of characters that would be written to the buffer if it existed. On the second call, the buffer will exist and you should write to it.
<simulation>otherwise RDK won't be able to recognise it as the simulation block when reading it back in. For example:
<simulation> <amount-first type="double">1.0</amount-first> <amount-second type="double">2.0</amount-second> </simulation>
The default implementation is a no-op that returns 0.
wszStream | The buffer to be filled with XML text. Only write the text, there is no need to write a zero terminator. |
maxChars | The physical number of characters that the buffer can accomodate. |
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Write the entire content XML to a buffer including parameters, simulation and children. Only write the text, there is no need to write a zero terminator. Only the top level CRhRdkContent object needs to call this method.
wszStream | The buffer to be filled with XML text. |
maxChars | The physical number of characters that the buffer can accomodate. |
context | gives the reason the method is being called. |
pOptions | is for future use. |