Rhino C++ API  8.14
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CRhRdkContent Class Referenceabstract

#include <RhRdkContent.h>

Inheritance diagram for CRhRdkContent:
CRhRdkObject IAutoUIExtraRequirements CRhRdkCoreContent CRhRdkEnvironment CRhRdkMaterial CRhRdkTexture CRhRdkBasicMaterialBase CRhRdkOneColorTextureBase CRhRdkBasicMaterial CRhRdkBasicOneColorTextureBase CRhRdkTwoColorTextureBase CRhRdkBasicTwoColorTextureBase

Classes

class  CChildIterator
 
class  CChildSlotIterator
 
class  CCustomUserDataFactory
 
class  Change
 
class  CRenderCRCFlags
 
class  DumpContext
 
class  ICustomUserData
 
class  TextureChannelInfo
 
class  unique_ptr
 

Public Types

enum  : unsigned int {
  bfTextureSummary = 0x0001, bfQuickPreview = 0x0002, bfPreviewCache = 0x0004, bfLocalTextureMapping = 0x0010,
  bfGraphDisplay = 0x0020, bfAdjustment = 0x0080, bfFields = 0x0100, bfNameTypeSection = 0x0800
}
 
enum  {
  pg_unused = 0x00000000, pg_sphere = 0x00000001, pg_cube = 0x00000002, pg_cone = 0x00000004,
  pg_pyramid = 0x00000008, pg_torus = 0x00000010, pg_plane = 0x00000020, pg_cone_sphere = 0x00010000,
  pg_scene = 0x00020000, pg_default_mat = pg_sphere | pg_cube | pg_cone | pg_pyramid | pg_torus | pg_plane | pg_scene, pg_default_env = pg_cone_sphere, pg_default_tex = pg_unused,
  pg_mat_scene = pg_scene, force32bit_pgflags = 0xFFFFFFFF
}
 
enum  {
  pb_unused = 0x00000000, pb_none = 0x00000001, pb_checker = 0x00000002, pb_custom = 0x00000004,
  pb_scene = 0x00000008, pb_default_mat = pb_none | pb_checker | pb_custom | pb_scene, pb_default_env = pb_unused, pb_default_tex = pb_unused,
  force32bit_pbflags = 0xFFFFFFFF
}
 
enum  {
  pl_unused = 0x00000000, pl_simple = 0x00000001, pl_sky = 0x00000002, pl_default_mat = pl_simple | pl_sky,
  pl_default_env = pl_unused, pl_default_tex = pl_unused, force32bit_plflags = 0xFFFFFFFF
}
 
enum  CopyMethods : unsigned int { CopyMethods::Normal, CopyMethods::Transient }
 
enum  CSIContext : unsigned int { CSIContext::All = 0, CSIContext::TextureSummary = 1, CSIContext::Private1 = 2, CSIContext::Private2 = 3 }
 
enum  DupOpt { DupOpt::Attach, DupOpt::NoAttach }
 
enum  DynamicIconUsage : unsigned int { DynamicIconUsage::TreeControl, DynamicIconUsage::SubnodeControl, DynamicIconUsage::ContentControl, DynamicIconUsage::General }
 
enum  EmbedFilesChoice : unsigned int { EmbedFilesChoice::kNeverEmbed, EmbedFilesChoice::kAlwaysEmbed, EmbedFilesChoice::kAskUser }
 
enum  ePreviewSceneType { preview_scene_server = 0, texture_2d_image = 1, force32_bit_sceneType = 0xFFFFFFFF }
 
enum  GDS_Flags : UINT_PTR {
  gds_Normal = 0x00000, gds_KindPrefix = 0x00001, gds_UppercasePropNames = 0x00002, gds_AbbreviatePropNames = 0x00004,
  gds_NameAndIdFirst = 0x00008, gds_ShortUuids = 0x00010, gds_SuppressDocumentId = 0x00020, gds_SuppressGroupId = 0x00040,
  gds_SuppressKind = 0x00080, gds_SuppressTags = 0x00100, gds_SuppressUsage = 0x00200, gds_SuppressSerialNumber = 0x00400,
  gds_SuppressCRCs = 0x00800, gds_SuppressChildSlotName = 0x01000, gds_SuppressRegistration = 0x02000, gds_SuppressAttributes = 0x04000,
  gds_SuppressCustomUserData = 0x08000, gds_SuppressTextureProxy = 0x10000
}
 
enum  Harvested : unsigned int { Harvested::None = 0, Harvested::Some = 1, Harvested::All = 2 }
 
enum  Kinds : unsigned int { Kinds::Unset, Kinds::Material, Kinds::Environment, Kinds::Texture }
 
enum  ParamSerialMethod : unsigned int { ParamSerialMethod::GetSet, ParamSerialMethod::XmlStream }
 
enum  ProxyTypes : unsigned int { ProxyTypes::None, ProxyTypes::Single, ProxyTypes::Multi, ProxyTypes::Texture }
 
enum  ReadParamsContext : unsigned int { ReadParamsContext::Serialization = 0, ReadParamsContext::Harvesting = 1, ReadParamsContext::Rendering = 2 }
 
enum  WriteParamsContext : unsigned int { WriteParamsContext::Serialization = 0, WriteParamsContext::Harvesting = 1, WriteParamsContext::Rendering = 2, WriteParamsContext::DragDrop = 3 }
 
- Public Types inherited from IAutoUIExtraRequirements
enum  SetContext : unsigned int { SetContext::UI, SetContext::Drop, SetContext::Program }
 

Public Member Functions

 CRhRdkContent ()
 
 CRhRdkContent (bool bAutoGlobalRegister)
 
virtual ~CRhRdkContent ()
 
virtual RDK_DEPRECATED void AddAutoParameters (class IRhRdkParamBlock &paramBlock, int id)
 
virtual void AddAutoParameters (class IRhRdkParamBlock &paramBlock, 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 CRhRdkContentBeginChange (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)
 
virtual_su bool CheckComplete (ON_wString &sReason) const
 
virtual RDK_DEPRECATED DWORD ChildrenRenderCRC (void) const
 
virtual CRhRdkVariant ChildSlotAmount (const wchar_t *wszChildSlotName) const
 
virtual_su 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
 
CRhRdkContentClone (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 IRhRdkContentUICreateUI (class IRhRdkContentEditor &e, const UUID &uuidUI, const class CRhRdkContentArray &aInitialClients, void *pReserved)=0
 
virtual const ICustomUserDataCustomUserData (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
 
virtual_su ON_wString DisplayName (void) const
 
virtual RDK_DEPRECATED CRhinoDocDocument (void) const
 
virtual_su CRhinoDocDocumentAssoc (void)
 
virtual const CRhinoDocDocumentAssoc (void) const
 
virtual ON_wString DragText (const UUID &uuidSource) const
 
ON_wString DragTextEx (const UUID &uuidSource, int version, void *) const
 
virtual_su void Dump (const DumpContext &dc, unsigned int gds_flags, int indent=0) const
 
virtual const RDK_DEPRECATED CRhRdkContentDuplicate (void) const
 
const RDK_DEPRECATED CRhRdkContentDuplicateEx (bool reserved) const
 
const CRhRdkContentDuplicateEx (DupOpt d) const
 
virtual IAutoUIExtraRequirementsDuplicateExtraRequirementsInterface (void) const
 
virtual bool DuplicationInProgress (void) const
 
virtual bool DynamicIcon (const ON_2iSize &size, CRhinoDib &dibOut, DynamicIconUsage usage) const =0
 
virtual CRhRdkContentEdit (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 CRhRdkContentFactoryFactory (void) const
 
virtual CRhRdkContentFastMakeCopy (CopyMethods m) const
 
class CRhRdkContentFieldsFields (void) const
 
virtual const CRhRdkContentFindChild (const wchar_t *wszChildSlotName) const
 
virtual const CRhRdkContentFindInstance (const UUID &uuidInstance) const
 
virtual RDK_DEPRECATED CRhRdkContentFindInstance (const wchar_t *wszName) const
 
virtual void FindInstanceByName (const wchar_t *wszName, bool bCaseSensitive, bool bRecurse, OUT CRhRdkContentArray &aContent) const
 
virtual const CRhRdkContentFirstChild (void) const
 
virtual const CRhRdkContentForDisplay (void) const
 
virtual void GetAutoParameters (const IRhRdkParamBlock &paramBlock, 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 &section, eGetParamsContext context)
 
virtual void * GetShader (const UUID &uuidRenderEngine, void *pvData) const
 
virtual bool GetSimulation (const IRhRdk_XMLSection &section)
 
void GetSortedChildren (OUT CRhRdkContentArray &aChild) const
 
virtual void GetUIs (ON_SimpleArray< IRhRdkContentUI * > &aOut) const =0
 
virtual_su 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
 
virtual_su 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 CRhRdkContentMakeCopy (CopyMethods m=CopyMethods::Normal) const
 
virtual_su CRhRdkContentMakeCopyForPreview (void) const
 
virtual RDK_DEPRECATED CRhRdkContentMakeGroupInstance (void)
 
virtual CRhRdkContentMakeGroupInstance (void) const
 
virtual CChildSlotIteratorNewChildSlotIterator (CSIContext context) const
 
virtual class CRhRdkPreviewBackgroundNewPreviewBackground (void) const =0
 
virtual class CRhRdkPreviewGeometryNewPreviewGeometry (void) const =0
 
virtual class IRhRdkPreviewSceneServerNewPreviewSceneServer (const class CRhRdkSSData &data) const =0
 
virtual const CRhRdkContentNextSibling (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)
 
virtual_su 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 CRhRdkContentParent (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
 
virtual_su void Promote (void)
 
virtual ProxyTypes ProxyType (void) const
 
virtual const CRhRdkDocumentRdkDocumentAssoc (void) const
 
virtual UUID RdkDocumentId (void) const
 
virtual const CRhRdkDocumentRdkDocumentOwner (void) const
 
virtual const RDK_DEPRECATED CRhRdkDocumentRdkDocumentRegistered (void) const
 
virtual bool ReadParametersFromSection (const IRhRdk_XMLSection &section, 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
 
virtual_su bool SetDocumentAssoc (const CRhRdkContent &source) 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)
 
virtual_su void SetInstanceName (const wchar_t *wszName, bool bRenameEvents, bool bEnsureNameUnique)
 
virtual void SetInstanceNameImpl (const wchar_t *wszName, bool bRenameEvents)
 
virtual_su 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 &section, eSetParamsContext context) const
 
virtual bool SetRdkDocumentAssoc (const CRhRdkDocument &rdkDoc)
 
virtual bool SetRdkDocumentOwner (CRhRdkDocument *pRdkDoc)
 
virtual bool SetSimulation (IRhRdk_XMLSection &section) 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_RenderContentToON_RenderContent (bool bRecursive=true) const
 
virtual CRhRdkContentTopLevel (void)
 
virtual const CRhRdkContentTopLevel (void) const
 
virtual CRhRdkContentTopLevelParent (void)
 
virtual const CRhRdkContentTopLevelParent (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 IRhRdkExpandableContentUIUI (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 &section, 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
 
- Public Member Functions inherited from CRhRdkObject
 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)
 
- Public Member Functions inherited from IAutoUIExtraRequirements
virtual ~IAutoUIExtraRequirements ()
 

Static Public Member Functions

static RhRdkChangeContext ChangeContextFromSetContext (SetContext sc)
 
static RDK_DEPRECATED CRhRdkContentCreateObjectFromType (UUID uuidType)
 
static CRhRdkContentFromON_RenderContent (const class ON_RenderContent &rc, const CRhinoDoc *pDocAssoc, bool bRecursive)
 
static RDK_DEPRECATED CRhRdkContentFromXMLStream (const wchar_t *wszXML)
 
static RDK_DEPRECATED CRhRdkContentFromXMLStream (const wchar_t *wszXML, const CRhinoDoc *pDocAssoc)
 
static CRhRdkContentFromXMLStream (const wchar_t *wszXML, const CRhinoDoc *pDocAssoc, bool bUseXMLInstanceId)
 
static bool IsChangeContextUIBased (RhRdkChangeContext cc)
 
static CRhRdkContentLoadFromLibraryFile (const wchar_t *sFullPath)
 
static SetContext SetContextFromChangeContext (RhRdkChangeContext cc)
 
static void UninitializeAndDelete (CRhRdkContent *pContent)
 
- Static Public Member Functions inherited from CRhRdkObject
static void CheckMemory (void)
 
static void PopulateDebuggingInfo (void)
 

Protected Member Functions

virtual unsigned int ComputeRenderCRC (const CRenderCRCFlags &rcrcFlags) const
 

Detailed Description

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:

  1. The user asks to create your content by pressing a button or menu and choosing your content from the browser.
  2. The RDK uses a factory to create it and calls Initialize().
  3. Your override of Initialize() uses the factory to create your child content and attaches it to the parent by calling SetChild().
  4. RDK attaches the root content (parent) to the specified document and sends events to update the UI.

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned int

Bit-flags returned by BitFlags()

Enumerator
bfTextureSummary 
bfQuickPreview 
bfPreviewCache 
bfLocalTextureMapping 
bfGraphDisplay 
bfAdjustment 
bfFields 
bfNameTypeSection 

◆ anonymous enum

anonymous enum
Enumerator
pg_unused 
pg_sphere 
pg_cube 
pg_cone 
pg_pyramid 
pg_torus 
pg_plane 
pg_cone_sphere 
pg_scene 
pg_default_mat 
pg_default_env 
pg_default_tex 
pg_mat_scene 
force32bit_pgflags 

◆ anonymous enum

anonymous enum
Enumerator
pb_unused 
pb_none 
pb_checker 
pb_custom 
pb_scene 
pb_default_mat 
pb_default_env 
pb_default_tex 
force32bit_pbflags 

◆ anonymous enum

anonymous enum
Enumerator
pl_unused 
pl_simple 
pl_sky 
pl_default_mat 
pl_default_env 
pl_default_tex 
force32bit_plflags 

◆ CopyMethods

enum CRhRdkContent::CopyMethods : unsigned int
strong
Enumerator
Normal 
Transient 

◆ CSIContext

enum CRhRdkContent::CSIContext : unsigned int
strong
Enumerator
All 
TextureSummary 
Private1 
Private2 

◆ DupOpt

enum CRhRdkContent::DupOpt
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'.

  • If the content is not associated with a document, the function merely returns a copy.
  • When 'd' is DupOpt::Attach:
    • If the content is associated with (or attached to) a document, the function returns a copy after attaching the copy to the same document. In this case, an undo record will be created and all necessary UI will be updated. Even if the source content is a child, the copy will be top-level. If a hidden content is copied via this method, the copy will not be hidden.
  • When 'd' is DupOpt::NoAttach:
    • The function returns a copy without attaching it to the document. In other words, it behaves exactly as if the original content was not associated with a document.
      Returns
      A pointer to the new content if successful, otherwise null.
Enumerator
Attach 
NoAttach 

◆ DynamicIconUsage

enum CRhRdkContent::DynamicIconUsage : unsigned int
strong

Used by DynamicIcon()

Enumerator
TreeControl 
SubnodeControl 
ContentControl 
General 

◆ EmbedFilesChoice

enum CRhRdkContent::EmbedFilesChoice : unsigned int
strong

Used by SaveToLibraryFile()

Enumerator
kNeverEmbed 
kAlwaysEmbed 
kAskUser 

◆ ePreviewSceneType

Enumerator
preview_scene_server 
texture_2d_image 
force32_bit_sceneType 

◆ GDS_Flags

enum CRhRdkContent::GDS_Flags : UINT_PTR
Enumerator
gds_Normal 
gds_KindPrefix 
gds_UppercasePropNames 
gds_AbbreviatePropNames 
gds_NameAndIdFirst 
gds_ShortUuids 
gds_SuppressDocumentId 
gds_SuppressGroupId 
gds_SuppressKind 
gds_SuppressTags 
gds_SuppressUsage 
gds_SuppressSerialNumber 
gds_SuppressCRCs 
gds_SuppressChildSlotName 
gds_SuppressRegistration 
gds_SuppressAttributes 
gds_SuppressCustomUserData 
gds_SuppressTextureProxy 

◆ Harvested

enum CRhRdkContent::Harvested : unsigned int
strong
Enumerator
None 
Some 
All 

◆ Kinds

enum CRhRdkContent::Kinds : unsigned int
strong
Enumerator
Unset 
Material 
Environment 
Texture 

◆ ParamSerialMethod

enum CRhRdkContent::ParamSerialMethod : unsigned int
strong
Enumerator
GetSet 
XmlStream 

◆ ProxyTypes

enum CRhRdkContent::ProxyTypes : unsigned int
strong
Returns
The proxy type of the content. The majority of contents you encounter will return 'None'. There are two types of proxies; proxy materials (single and multi) and proxy textures. When a content is a proxy material it represents a material in the document material table that is not associated with an RDK material. These are also known as 'legacy' or 'V4' materials because they originated in old Rhino 4 documents. These proxies are not true document contents and they automatically come and go depending on the state of the material table and the objects that use the table. When a content is a proxy texture it is an aggregate of first-level child textures from any material or environment hierarchy in the document. This allows the Texture Palette to display child textures all in one place for ease of editing.
Enumerator
None 
Single 
Multi 
Texture 

◆ ReadParamsContext

enum CRhRdkContent::ReadParamsContext : unsigned int
strong

Context for ReadParametersFromSection() and ReadParameterXMLStream().

Enumerator
Serialization 
Harvesting 
Rendering 

◆ WriteParamsContext

enum CRhRdkContent::WriteParamsContext : unsigned int
strong

Context for WriteParametersToSection(), WriteXMLStream() and WriteParameterXMLStream().

Enumerator
Serialization 
Harvesting 
Rendering 
DragDrop 

Constructor & Destructor Documentation

◆ CRhRdkContent() [1/2]

CRhRdkContent::CRhRdkContent ( )

This constructor automatically registers the content in the global content registry.

Note
Construction should not call any virtual content methods. If you need to do anything complicated, please override Initialize() and do it there.
See also
CRhRdkContent::Initialize().

◆ CRhRdkContent() [2/2]

CRhRdkContent::CRhRdkContent ( bool  bAutoGlobalRegister)
Parameters
bAutoGlobalRegisterspecifies if the content should automatically be registered in the global content registry.
Note
Construction should not call any virtual content methods. If you need to do anything complicated, please override Initialize() and do it there.
See also
CRhRdkContent::Initialize().

◆ ~CRhRdkContent()

virtual CRhRdkContent::~CRhRdkContent ( )
virtual

Member Function Documentation

◆ AddAutoParameters() [1/2]

virtual RDK_DEPRECATED void CRhRdkContent::AddAutoParameters ( class IRhRdkParamBlock paramBlock,
int  id 
)
virtual

This method is deprecated in favor of the one below.

◆ AddAutoParameters() [2/2]

virtual void CRhRdkContent::AddAutoParameters ( class IRhRdkParamBlock paramBlock,
int  id 
) const
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.

See also
BitFlags(). The default implementation is a no-op. Even if you are using fields, you still need to override this and call Fields().AddValuesToParamBlock().
Parameters
paramBlockis the collection.
idis a caller-defined identifier (can be zero if not needed). Values of 0x8000 and above are reserved for RDK internal use.
See also
enum CRhRdkCoreContent::eSectionId for special values used internally.

Reimplemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.

◆ AddChild()

virtual RDK_DEPRECATED bool CRhRdkContent::AddChild ( CRhRdkContent pChild,
const wchar_t *  wszChildSlotName 
)
virtual

This method is deprecated in favor of SetChild()

◆ AddToDocumentList()

virtual bool CRhRdkContent::AddToDocumentList ( CRhRdkDocument rdkDoc)
virtual

◆ AddUI()

virtual void CRhRdkContent::AddUI ( IRhRdkContentUI ui) const
pure virtual

Implemented in CRhRdkCoreContent.

◆ AppearanceDefaults()

virtual const class IRhRdkPreviewAppearanceDefaults* CRhRdkContent::AppearanceDefaults ( void  ) const
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.

See also
IRhRdkPreviewAppearanceDefaults
CRhRdkPreviewAppearance

◆ AttachCustomUserData()

virtual bool CRhRdkContent::AttachCustomUserData ( ICustomUserData data)
virtual

◆ AutoDelete()

virtual bool CRhRdkContent::AutoDelete ( void  ) const
virtual
Returns
true if the content hierarchy is auto-deleted when not in use, else false.

◆ AutomaticInstanceName()

virtual ON_wString CRhRdkContent::AutomaticInstanceName ( void  ) const
virtual
Returns
the default content name stem (e.g., "Custom Material"). By default this function returns TypeName(). Bitmap-based materials return the filename of the bitmap.

Reimplemented in CRhRdkBasicMaterial.

◆ BeginChange()

virtual CRhRdkContent& CRhRdkContent::BeginChange ( RhRdkChangeContext  cc) const
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.

Note
If Changed() was called between the calls to BeginChange() and EndChange(), the last call to EndChange() may cause the OnContentChanged event to be sent.
Parameters
ccis 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.
Note
If you override this method, please be sure to call the base class.
See also
EndChange()
Changed()
Returns
A non-const reference to this content.

◆ BitFlags()

virtual unsigned int CRhRdkContent::BitFlags ( void  ) const
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.

Returns
The bit-coded flags for this content.

Reimplemented in CRhRdkBasicMaterial, CRhRdkOneColorTextureBase, and CRhRdkTexture.

◆ CanBeEdited()

virtual bool CRhRdkContent::CanBeEdited ( void  ) const
virtual
Returns
true if a content can be edited in a content editor.

◆ Category()

virtual const wchar_t* CRhRdkContent::Category ( void  ) const
pure virtual
Returns
The category of the content.

Implemented in CRhRdkBasicMaterial, CRhRdkMaterial, and CRhRdkEnvironment.

◆ ChangeChild()

virtual bool CRhRdkContent::ChangeChild ( CRhRdkContent pOldChild,
CRhRdkContent pNewChild 
)
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.

◆ ChangeContextFromSetContext()

static RhRdkChangeContext CRhRdkContent::ChangeContextFromSetContext ( SetContext  sc)
static

Convert IAutoUIExtraRequirements::SetContext to RhRdkChangeContext.

◆ Changed() [1/2]

virtual RDK_DEPRECATED void CRhRdkContent::Changed ( eChangeContext  cc)
virtual

This method is deprecated in favor of the one below.

◆ Changed() [2/2]

virtual void CRhRdkContent::Changed ( void  )
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.

Note
If you are using content fields, setting the field value with SetValue() calls this automatically.

◆ CheckComplete()

virtual_su bool CRhRdkContent::CheckComplete ( ON_wString sReason) const
Returns
true if the content hierarchy is 'complete'. If the content uses textures that have missing image files, for example, it is considered to be incomplete.
Parameters
sReasonis 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.

◆ ChildrenRenderCRC()

virtual RDK_DEPRECATED DWORD CRhRdkContent::ChildrenRenderCRC ( void  ) const
virtual

This method is deprecated and no longer called. For more information

See also
ComputeRenderCRC()

◆ ChildSlotAmount()

virtual CRhRdkVariant CRhRdkContent::ChildSlotAmount ( const wchar_t *  wszChildSlotName) const
virtual

Get the amount of the specified child slot in the range 0 to 100.

Parameters
wszChildSlotNameis the child slot to get the amount for.
Returns
The amount of the child slot (variant will be a numeric type or null if function fails or is not supported).

◆ ChildSlotDisplayName()

virtual_su ON_wString CRhRdkContent::ChildSlotDisplayName ( void  ) const
Returns
The localized display name of the child slot name.

◆ ChildSlotName()

virtual ON_wString CRhRdkContent::ChildSlotName ( void  ) const
virtual
Returns
The child slot name of this content.

◆ ChildSlotNameFromParamName()

virtual ON_wString CRhRdkContent::ChildSlotNameFromParamName ( const wchar_t *  wszParamName) const
virtual
Returns
The child slot name corresponding to a parameter name.

Reimplemented in CRhRdkBasicMaterial.

◆ ChildSlotOn()

virtual CRhRdkVariant CRhRdkContent::ChildSlotOn ( const wchar_t *  wszChildSlotName) const
virtual

Get the 'on' state of the specified child slot.

Parameters
wszChildSlotNameis the child slot to get the state of.
Returns
The 'on' state of the child slot (variant will be type bool or null if function fails or is not supported).

◆ Clone()

CRhRdkContent* CRhRdkContent::Clone ( CopyMethods  m = CopyMethods::Normal) const

Internally this method calls MakeCopy().

See also
MakeCopy().

◆ CommonCtor()

void CRhRdkContent::CommonCtor ( bool  b)

◆ ComputeRenderCRC()

virtual unsigned int CRhRdkContent::ComputeRenderCRC ( const CRenderCRCFlags rcrcFlags) const
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.

See also
RenderCRC()

Reimplemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.

◆ ContentNameTakenFromFileName()

virtual bool CRhRdkContent::ContentNameTakenFromFileName ( void  ) const
virtual
Returns
true if content's name is derived from a file name. Used to support file-based textures. The default implementation returns false.

◆ ConvertMetersToUnits()

virtual void CRhRdkContent::ConvertMetersToUnits ( void  )
virtual

Reimplemented in CRhRdkTexture.

◆ ConvertUnitsToMeters()

virtual void CRhRdkContent::ConvertUnitsToMeters ( void  )
virtual

Reimplemented in CRhRdkTexture.

◆ CreatedByLoading()

virtual bool CRhRdkContent::CreatedByLoading ( void  ) const
virtual
Returns
true if the content was created by loading it from a file, else false.

◆ CreateLibraryPreview() [1/2]

virtual RDK_DEPRECATED HBITMAP CRhRdkContent::CreateLibraryPreview ( const class CSize &  sizeImage,
const IRhRdkPreviewSceneServer pSceneServer 
) const
virtual

This method is deprecated in favor of the one below.

◆ CreateLibraryPreview() [2/2]

virtual bool CRhRdkContent::CreateLibraryPreview ( const ON_2iSize sizeImage,
const IRhRdkPreviewSceneServer pSceneServer,
CRhinoDib dibOut 
) const
virtual

Create a preview bitmap for use when saving the content to the content library.

Parameters
sizeImageThe size of the image to render.
pSceneServerA scene server that defines the scene for the preview rendering. This parameter will be null if the content is a texture.
dibOutaccepts the rendered preview if the method returns true.
Returns
true if successful, else false.

Reimplemented in CRhRdkTexture.

◆ CreateObjectFromType()

static RDK_DEPRECATED CRhRdkContent* CRhRdkContent::CreateObjectFromType ( UUID  uuidType)
static

DEPRECATED. Call RhRdkContentFactories().NewContentFromTypeEx() instead.

◆ CreatePreview() [1/2]

virtual RDK_DEPRECATED HBITMAP CRhRdkContent::CreatePreview ( class CRhRdkRenderPlugIn plugIn,
const class CSize &  sizeImage,
eRhRdkRenderQuality  qual,
const class IRhRdkPreviewSceneServer pSceneServer 
) const
virtual

This method is deprecated in favor of the one below.

◆ CreatePreview() [2/2]

virtual bool CRhRdkContent::CreatePreview ( CRhRdkRenderPlugIn plugIn,
const ON_2iSize sizeImage,
RhRdkPreviewQuality  qual,
const IRhRdkPreviewSceneServer pSceneServer,
class IRhRdkPreviewCallbacks pNotify,
CRhinoDib dibOut 
) const
pure virtual

Create a preview of the content for use in the content editor thumbnail display.

Parameters
plugInThe render plug-in to use to render the preview.
sizeImageThe size of the image to render.
qualThe quality of the preview.
pSceneServerA scene server that defines the scene for the preview rendering.
dibOutaccepts the rendered preview if the method returns true.
Returns
true if successful, else false.

Implemented in CRhRdkCoreContent, and CRhRdkTexture.

◆ CreateUI()

virtual class IRhRdkContentUI* CRhRdkContent::CreateUI ( class IRhRdkContentEditor e,
const UUID &  uuidUI,
const class CRhRdkContentArray aInitialClients,
void *  pReserved 
)
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.

See also
CRhRdkCoreContent::CreateUI()
Returns
true if successful, else false.

◆ CustomUserData()

virtual const ICustomUserData* CRhRdkContent::CustomUserData ( const UUID &  uuidDataId) const
virtual

◆ DecrementUseCount()

virtual RDK_DEPRECATED void CRhRdkContent::DecrementUseCount ( void  ) const
virtual

Obsolete. Not implemented.

◆ DeleteAllChildren()

virtual void CRhRdkContent::DeleteAllChildren ( void  )
virtual

Deletes all the children of this content. This method sends events and records undo.

◆ DeleteChild()

virtual bool CRhRdkContent::DeleteChild ( const wchar_t *  wszChildSlotName)
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.

Parameters
wszChildSlotNameis the child slot name of the child to delete.
Returns
true if successful, else false.

◆ DestroyChildContent() [1/2]

virtual RDK_DEPRECATED void CRhRdkContent::DestroyChildContent ( const UUID &  uuidPlugIn)
virtual

This method is deprecated in favor of the one below.

◆ DestroyChildContent() [2/2]

virtual void CRhRdkContent::DestroyChildContent ( const UUID &  uuidPlugIn) const
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.

◆ DetachCustomUserData()

virtual bool CRhRdkContent::DetachCustomUserData ( ICustomUserData pUD)
virtual

◆ DisplayContextHelp()

virtual void CRhRdkContent::DisplayContextHelp ( HWND  hwndParent) const
virtual

Displays context-sensitive help.

Reimplemented in CRhRdkBasicMaterial.

◆ DisplayDebugString()

virtual void CRhRdkContent::DisplayDebugString ( const wchar_t *  wszTitle = L"") const
virtual

Display debugging information in the debug output window.

◆ DisplayName()

virtual_su ON_wString CRhRdkContent::DisplayName ( void  ) const
Returns
The content's display name. This is the same as InstanceName() except if the name is empty, it returns '(unnamed)'. This is suitable for display in user interfaces.

◆ Document()

virtual RDK_DEPRECATED CRhinoDoc* CRhRdkContent::Document ( void  ) const
virtual
Deprecated:
This method is not implemented and returns null. Please use one of the other document methods to get the RDK Document.

◆ DocumentAssoc() [1/2]

virtual_su CRhinoDoc* CRhRdkContent::DocumentAssoc ( void  )

◆ DocumentAssoc() [2/2]

virtual const CRhinoDoc* CRhRdkContent::DocumentAssoc ( void  ) const
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.

Note
This gets the document that the content is associated with. Just being associated with a document does not mean the content is actually attached to that document. You must call IsOwnedByDocument() to find out if the content is attached to and managed by a document. Clones and copies of content are not attached to a document, but they are still associated with the same document as the content they were cloned/copied from.
Returns
A pointer to the Rhino document that the content hierarchy is associated with, or null if the content hierarchy is not associated with a document.

◆ DragText()

virtual ON_wString CRhRdkContent::DragText ( const UUID &  uuidSource) const
virtual

◆ DragTextEx()

ON_wString CRhRdkContent::DragTextEx ( const UUID &  uuidSource,
int  version,
void *   
) const

◆ Dump()

virtual_su void CRhRdkContent::Dump ( const DumpContext dc,
unsigned int  gds_flags,
int  indent = 0 
) const

Dump the content state to a 'dump context'.

Parameters
gds_flagsis a flag word (see GetDebugString() for details).
indentis an indent amount for formatting.

◆ Duplicate()

virtual const RDK_DEPRECATED CRhRdkContent* CRhRdkContent::Duplicate ( void  ) const
virtual

Please call DuplicateEx(DupOpt) instead.

◆ DuplicateEx() [1/2]

const RDK_DEPRECATED CRhRdkContent* CRhRdkContent::DuplicateEx ( bool  reserved) const

Please call DuplicateEx(DupOpt) instead.

◆ DuplicateEx() [2/2]

const CRhRdkContent* CRhRdkContent::DuplicateEx ( DupOpt  d) const

◆ DuplicateExtraRequirementsInterface()

virtual IAutoUIExtraRequirements* CRhRdkContent::DuplicateExtraRequirementsInterface ( void  ) const
virtual

This is an advanced method which you should never need to override.

Implements IAutoUIExtraRequirements.

◆ DuplicationInProgress()

virtual bool CRhRdkContent::DuplicationInProgress ( void  ) const
virtual

◆ DynamicIcon()

virtual bool CRhRdkContent::DynamicIcon ( const ON_2iSize size,
CRhinoDib dibOut,
DynamicIconUsage  usage 
) const
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().

Parameters
sizeis the desired physical size of the imagery, in pixels.
dibOutis a DIB that accepts the created imagery.
usagespecifies how the icon will be used.
Returns
true if successful, else false.

Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.

◆ Edit()

virtual CRhRdkContent* CRhRdkContent::Edit ( void  ) const
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:

const auto* pContentNew = pContent->Edit();
if (nullptr != pContentNew)
{
...
}
Returns
An edited version of the content hierarchy if successful, else null. This edited version has the same instance ids as the original and is unregistered. You can either attach it to a document or globally register it for normal non-document use. Note that if you choose to do the latter, you must first make sure that either the instance ids are changed or the original hierarchy is deleted.
See also
GlobalRegister()
Note
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 content, not a child.

You can also replace a document content with an edited version of it.

See also
RhRdkReplaceContentInDocument().

◆ EmbeddedFiles()

virtual ON_wString CRhRdkContent::EmbeddedFiles ( void  ) const
virtual
Returns
A semicolon-delimited string of full paths to files used by the content that need to be embedded in .3dm files and library files (.rmtl, .renv, .rtex). The default implementation returns an empty string. 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.

◆ EmbeddedFilesRecursive()

virtual ON_wString CRhRdkContent::EmbeddedFilesRecursive ( void  ) const
virtual
Returns
A semicolon-delimited string of full paths to files used by the content and its children. The default implementation recursively calls EmbeddedFiles on this content and its children and collates the results.

◆ EmergencyUnregister()

void CRhRdkContent::EmergencyUnregister ( void  ) const

◆ EndChange()

virtual bool CRhRdkContent::EndChange ( void  )
virtual

Ends a change or batch of changes. Calls to this method are counted; you must call EndChange() once for every call to BeginChange().

Note
If BeginChange() was called with UI, Program, Drop or Tree and Changed() was called between the calls to BeginChange() and EndChange(), the last call to EndChange() will send the OnContentChanged event.
If you override this method, please be sure to call the base class.
See also
BeginChange()
Changed()
Returns
true if a change has actually occurred, else false.

◆ EVF()

virtual void* CRhRdkContent::EVF ( const wchar_t *  wszFunc,
void *  pvData 
)
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.

◆ ExecuteCommand()

virtual void CRhRdkContent::ExecuteCommand ( UUID  uuidCommand,
void *  pvData 
) const
virtual

Executes a command.

Parameters
uuidCommandis the UUID of the command.
pvDatais a pointer to command-specific data.

◆ Factory()

virtual const CRhRdkContentFactory* CRhRdkContent::Factory ( void  ) const
virtual
Returns
A pointer to the factory that creates this type of content (or null if the factory could not be found; this can happen if the plug-in containing the factory has been unplugged.

◆ FastMakeCopy()

virtual CRhRdkContent* CRhRdkContent::FastMakeCopy ( CopyMethods  m) const
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.

◆ Fields()

class CRhRdkContentFields& CRhRdkContent::Fields ( void  ) const

Get the content fields.

See also
CRhRdkContentField.
CRhRdkContentFields.
BitFlags().

◆ FindChild()

virtual const CRhRdkContent* CRhRdkContent::FindChild ( const wchar_t *  wszChildSlotName) const
virtual
Returns
The immediate child that has the specified child slot name or null if none.

◆ FindInstance() [1/2]

virtual const CRhRdkContent* CRhRdkContent::FindInstance ( const UUID &  uuidInstance) const
virtual

Searches for the content with the specified instance id. Looks at itself and all children recursively.

Returns
A const pointer to the content with the required instance id, or null if not found. If you want to modify the content you will need to call BeginChange() to get a non-const reference.
See also
BeginChange()

◆ FindInstance() [2/2]

virtual RDK_DEPRECATED CRhRdkContent* CRhRdkContent::FindInstance ( const wchar_t *  wszName) const
virtual

This method is deprecated in favor of the one below.

◆ FindInstanceByName()

virtual void CRhRdkContent::FindInstanceByName ( const wchar_t *  wszName,
bool  bCaseSensitive,
bool  bRecurse,
OUT CRhRdkContentArray aContent 
) const
virtual

Searches the content hierarchy for contents with the specified instance name.

Parameters
wszNameis the name to search for.
bCaseSensitivespecifies if the name check is case-sensitive or not.
bRecursespecifies if the content's children should be searched.
aContentaccepts all the contents that satisfy the search.

◆ FirstChild()

virtual const CRhRdkContent* CRhRdkContent::FirstChild ( void  ) const
virtual
Returns
First child of this content or null if none.

◆ ForDisplay()

virtual const CRhRdkContent* CRhRdkContent::ForDisplay ( void  ) const
virtual

◆ FromON_RenderContent()

static CRhRdkContent* CRhRdkContent::FromON_RenderContent ( const class ON_RenderContent rc,
const CRhinoDoc pDocAssoc,
bool  bRecursive 
)
static

Creates a new CRhRdkContent derived object from an ON_RenderContent.

◆ FromXMLStream() [1/3]

static RDK_DEPRECATED CRhRdkContent* CRhRdkContent::FromXMLStream ( const wchar_t *  wszXML)
static

◆ FromXMLStream() [2/3]

static RDK_DEPRECATED CRhRdkContent* CRhRdkContent::FromXMLStream ( const wchar_t *  wszXML,
const CRhinoDoc pDocAssoc 
)
static

◆ FromXMLStream() [3/3]

static CRhRdkContent* CRhRdkContent::FromXMLStream ( const wchar_t *  wszXML,
const CRhinoDoc pDocAssoc,
bool  bUseXMLInstanceId 
)
static

Creates a new CRhRdkContent derived object from an XML stream.

◆ GetAutoParameters()

virtual void CRhRdkContent::GetAutoParameters ( const IRhRdkParamBlock paramBlock,
int  id 
)
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.

See also
BitFlags(). The default implementation is a no-op. Even if you are using fields, you still need to override this and call Fields().GetValuesFromParamBlock().
Parameters
paramBlockis the collection.
idis a caller-defined identifier (can be zero if not needed). Values of 0x8000 and above are reserved for RDK internal use.
See also
enum CRhRdkCoreContent::eSectionId for special values used internally.

Reimplemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.

◆ GetChangeContext()

virtual RhRdkChangeContext CRhRdkContent::GetChangeContext ( void  ) const
virtual

Gets the change context that was passed to BeginChange().

Note
Unset is never returned. If BeginChange() has not been called, the method returns Ignore.
See also
BeginChange().

◆ GetChildIterator()

virtual CChildIterator CRhRdkContent::GetChildIterator ( void  ) const
virtual
Returns
An iterator for accessing children.

◆ GetDebugString()

virtual ON_wString CRhRdkContent::GetDebugString ( const wchar_t *  sep,
UINT_PTR  flags 
) const
virtual

Get debugging information as a string.

Parameters
sepis a separator (e.g., L", " or L"\n").
flagsis a flag word (see above).

◆ GetDefaultsFromUser() [1/2]

virtual RDK_DEPRECATED bool CRhRdkContent::GetDefaultsFromUser ( HWND  )
virtual

This method is deprecated in favor of the one below.

◆ GetDefaultsFromUser() [2/2]

virtual bool CRhRdkContent::GetDefaultsFromUser ( void  )
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.

Returns
true if successful, false if user cancelled.

◆ GetEnglishParamName()

virtual ON_wString CRhRdkContent::GetEnglishParamName ( const wchar_t *  wszParamName) const
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.

Parameters
wszParamNameis the name of the parameter for which the localized string is required.

Reimplemented in CRhRdkBasicMaterial.

◆ GetExtraRequirementParameter()

virtual bool CRhRdkContent::GetExtraRequirementParameter ( const wchar_t *  wszParamName,
const wchar_t *  wszExtraReqName,
CRhRdkVariant vValueOut 
) const
virtual

Optionally override this method to get a parameter for extra UI requirements. Please be sure to call the base class.

Parameters
wszParamNameThe name of the content parameter for which to get an extra requirement parameter.
See also
ParamNameFromChildSlotName() which is relevant when addressing child slots.
Parameters
wszExtraReqNameThe name of the extra requirement parameter to retrieve.
vValueOutReceives the parameter's value.
Returns
true if the parameter was retrieved successfuly, else false.
Note
This method must set vValueOut to a non-null value if it returns true.

Implements IAutoUIExtraRequirements.

Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, and CRhRdkOneColorTextureBase.

◆ GetInstanceIdsRecursive()

virtual void CRhRdkContent::GetInstanceIdsRecursive ( class CRhRdkInstanceIdArray aOut) const
virtual

Gets the unique instance id of this instance and all its children.

Parameters
aOutis an array that accepts the instance ids.

◆ GetLocalizedParamName()

virtual ON_wString CRhRdkContent::GetLocalizedParamName ( const wchar_t *  wszParamName) const
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.

Parameters
wszParamNameis the name of the parameter for which the localized string is required.

Reimplemented in CRhRdkBasicMaterial.

◆ GetParameter()

virtual CRhRdkVariant CRhRdkContent::GetParameter ( const wchar_t *  wszName) const
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.

◆ GetParameters()

virtual RDK_DEPRECATED bool CRhRdkContent::GetParameters ( const class IRhRdk_XMLSection section,
eGetParamsContext  context 
)
virtual

This method is deprecated in favor of ReadParametersFromSection().

◆ GetShader()

virtual void* CRhRdkContent::GetShader ( const UUID &  uuidRenderEngine,
void *  pvData 
) const
virtual

Implement this method to return a pointer to your renderer's shader object for this content.

Parameters
uuidRenderEngineis the render engine id of the caller.
pvDatais a pointer to any necessary private data, or null if not required.
Returns
A pointer to your renderer's shader object or null on failure.

Reimplemented in CRhRdkOneColorTextureBase, and CRhRdkBasicMaterialBase.

◆ GetSimulation()

virtual bool CRhRdkContent::GetSimulation ( const IRhRdk_XMLSection section)
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.

◆ GetSortedChildren()

void CRhRdkContent::GetSortedChildren ( OUT CRhRdkContentArray aChild) const

Get an array of children sorted by their child-slot name.

◆ GetUIs()

virtual void CRhRdkContent::GetUIs ( ON_SimpleArray< IRhRdkContentUI * > &  aOut) const
pure virtual

Get an array of pointers to UIs that the content is a client of.

Implemented in CRhRdkCoreContent.

◆ GetUnderlyingInstances()

virtual_su bool CRhRdkContent::GetUnderlyingInstances ( OUT CRhRdkContentArray a) const

DO NOT CALL THIS FUNCTION OUTSIDE OF THE RDK CORE. This function needs to be deprecated ASAP.

◆ GlobalRegister()

virtual bool CRhRdkContent::GlobalRegister ( bool  bRegister = true)
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.

Parameters
bRegisteris true to register the content, false to unregister it.
Returns
true if successful, else false.

◆ GroupId()

virtual const UUID& CRhRdkContent::GroupId ( void  ) const
virtual

◆ HarvestData()

virtual Harvested CRhRdkContent::HarvestData ( const CRhRdkContent oldContent)
pure virtual

Implement this to transfer data from another content to this content during creation.

Parameters
oldContentis an old content from which the implementation may harvest data.

Implemented in CRhRdkBasicMaterial, CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.

◆ Icon() [1/2]

virtual bool CRhRdkContent::Icon ( const ON_2iSize size,
CRhinoDib dibOut 
) const
pure virtual

Creates imagery (AKA an 'icon') to represent the content's type. This imagery is static, i.e., it does not change.

Parameters
sizeis the desired physical size of the imagery, in pixels.
dibOutis a DIB that accepts the created imagery.
Returns
true if successful, else false.

Implemented in CRhRdkBasicMaterial, CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.

◆ Icon() [2/2]

virtual RDK_DEPRECATED HICON CRhRdkContent::Icon ( void  ) const
virtual

This method is deprecated in favor of the one below.

◆ Imp()

CImpl& CRhRdkContent::Imp ( void  ) const

◆ IncrementUseCount()

virtual RDK_DEPRECATED void CRhRdkContent::IncrementUseCount ( void  ) const
virtual

Obsolete. Not implemented.

◆ Initialize()

virtual bool CRhRdkContent::Initialize ( void  )
virtual

Override this to initialize your content. Please be sure to call the base class before calling any other methods in your override.

Note
If you create a content using 'new' or the low-level factory methods NewContent(), NewMaterial(), NewEnvironment(), or NewTexture(), then you must call this method on your new content. If, however, you create the content by calling the higher-level methods NewContentFromType() or CreateContentByType() then you must not call this method because RDK calls it automatically.
See also
CRhRdkContentFactory::NewContent()
CRhRdkMaterialFactory::NewMaterial()
CRhRdkEnvironmentFactory::NewEnvironment()
CRhRdkTextureFactory::NewTexture()
IRhRdkContentFactories::NewContentFromType()
CRhRdkDocument::CreateContentByType()
Returns
true if successful, else false.

Reimplemented in CRhRdkTexture.

◆ InstanceId()

virtual const UUID& CRhRdkContent::InstanceId ( void  ) const
virtual
Returns
The unique instance id of this instance.

◆ InstanceName()

virtual ON_wString CRhRdkContent::InstanceName ( void  ) const
virtual
Returns
The content's name.

◆ InternalChanged()

virtual void CRhRdkContent::InternalChanged ( RhRdkChangeContext  ,
const CRhRdkContent  
)
virtual

◆ InternalName()

virtual ON_wString CRhRdkContent::InternalName ( void  ) const
pure virtual
Returns
The internal name of the content type. This name should never change and should not be localized.

Implemented in CRhRdkBasicMaterial.

◆ IsBasicType()

virtual bool CRhRdkContent::IsBasicType ( void  ) const
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.

◆ IsBuiltIn()

virtual bool CRhRdkContent::IsBuiltIn ( void  ) const
virtual

◆ IsChangeContextUIBased()

static bool CRhRdkContent::IsChangeContextUIBased ( RhRdkChangeContext  cc)
static
Returns
true if change context is UI based.

◆ IsChild()

virtual_su bool CRhRdkContent::IsChild ( void  ) const
Returns
true if this is a child content (i.e., has a parent; is not top-level).

◆ IsCompatible()

virtual bool CRhRdkContent::IsCompatible ( const UUID &  uuidRenderEngine) const
virtual

A content is compatible with a render engine when its RenderEngineId() matches the id of the render engine.

Returns
true if the content is compatible with the specified render engine, else false.

◆ IsContentTypeAcceptableAsChild()

virtual bool CRhRdkContent::IsContentTypeAcceptableAsChild ( const UUID &  uuidType,
const wchar_t *  wszChildSlotName 
) const
virtual
Returns
true only if content type can be accepted as a child in the specified child slot.

◆ IsCRCCached()

virtual RDK_DEPRECATED bool CRhRdkContent::IsCRCCached ( void  ) const
virtual

This method is deprecated and no longer called. For more information

See also
ComputeRenderCRC()

◆ IsDefaultInstance()

virtual bool CRhRdkContent::IsDefaultInstance ( void  ) const
virtual
Returns
true if the content is the 'default instance' for its kind.

◆ IsFactoryProductAcceptableAsChild() [1/2]

virtual bool CRhRdkContent::IsFactoryProductAcceptableAsChild ( const class CRhRdkContentFactory f,
const wchar_t *  wszChildSlotName 
) const
virtual
Returns
true only if content produced by a certain factory can be accepted as a child in the specified child slot.

◆ IsFactoryProductAcceptableAsChild() [2/2]

virtual RDK_DEPRECATED bool CRhRdkContent::IsFactoryProductAcceptableAsChild ( const class CRhRdkContentFactory pFactory,
const wchar_t *  wszChildSlotName 
) const
virtual

This method is deprecated in favor of the one below.

◆ IsHidden()

virtual bool CRhRdkContent::IsHidden ( void  ) const
virtual
Returns
true if the content is hidden from the 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 (
See also
Edit()). They also appear in 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 contents are not listed. Hidden contents, being part of the document content list, will be listed by any scripts or other code that iterates over the document content list.

◆ IsHiddenByAutoDelete()

virtual bool CRhRdkContent::IsHiddenByAutoDelete ( void  ) const
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.

Returns
true if the content is hidden by the auto-delete system.

◆ IsInDocument()

virtual RDK_DEPRECATED bool CRhRdkContent::IsInDocument ( void  ) const
virtual

This method is deprecated in favor of IsOwnedByDocument()

◆ IsKind()

virtual bool CRhRdkContent::IsKind ( CRhRdkContent::Kinds  kind) const
virtual
Returns
true if the kind of this content matches the input.

◆ IsLocked()

virtual bool CRhRdkContent::IsLocked ( void  ) const
virtual
Returns
true if the content is locked. Locked contents cannot be deleted or renamed by the UI.
Note
This method returns true if this content or any of its ancestors are locked.

◆ IsOwnedByDocument()

virtual bool CRhRdkContent::IsOwnedByDocument ( void  ) const
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.

See also
RdkDocumentOwner().
SetRdkDocument().
Returns
true if the content (or its top-level parent) is owned by a document, else false.

◆ IsPerObject()

virtual bool CRhRdkContent::IsPerObject ( void  ) const
virtual
Returns
true if the content or any of its children uses per-object properties, else false.

◆ IsPrivate()

virtual bool CRhRdkContent::IsPrivate ( void  ) const
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.

Returns
true if the content is private, else false.

◆ IsReference()

virtual bool CRhRdkContent::IsReference ( void  ) const
virtual

Query whether or not the content or any of its ancestors is a reference content.

Returns
true if the content is a reference, else false.

◆ IsRhinoObjectSelected()

virtual bool CRhRdkContent::IsRhinoObjectSelected ( void  ) const
virtual

◆ IsSurrogate()

virtual bool CRhRdkContent::IsSurrogate ( void  ) const
virtual

◆ IsTopLevel()

virtual bool CRhRdkContent::IsTopLevel ( void  ) const
virtual
Returns
true if this is a top-level content (i.e., has no parent; is not a child).

◆ IsUniversal()

virtual bool CRhRdkContent::IsUniversal ( void  ) const
virtual

A content is universal if it is meant to be used with any render engine.

Returns
true if the content is universal, else false.

◆ IsV4Material()

virtual bool CRhRdkContent::IsV4Material ( void  ) const
virtual
Returns
true if the content is actually a V4 material (AKA 'proxy'), else false. This is for RDK internal use only and should not be overridden by clients.

◆ Kind()

virtual Kinds CRhRdkContent::Kind ( void  ) const
pure virtual
Returns
The kind of the content.

Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.

◆ LibraryFileExtension()

virtual const wchar_t* CRhRdkContent::LibraryFileExtension ( void  ) const
pure virtual
Returns
A pointer to a fixed string giving the library file extension of the content.

Implemented in CRhRdkMaterial, CRhRdkTexture, and CRhRdkEnvironment.

◆ LibraryFileName()

virtual ON_wString CRhRdkContent::LibraryFileName ( void  ) const
virtual

◆ LoadFromLibraryFile()

static CRhRdkContent* CRhRdkContent::LoadFromLibraryFile ( const wchar_t *  sFullPath)
static

Load a content from a library file.

Parameters
sFullPathis the full path to the library file to load.
Returns
A pointer to a new content on success, else null.

◆ MakeCopy()

virtual CRhRdkContent* CRhRdkContent::MakeCopy ( CopyMethods  m = CopyMethods::Normal) const
virtual

Copies the current content including its children.

Parameters
mis 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.
Note
The copy can subsequently be attached to a document if desired.
The copied contents will be found by RhRdkFindContentInstance().
Returns
A copy of the content tree.

Reimplemented in CRhRdkOneColorTextureBase, CRhRdkMaterial, CRhRdkBasicMaterial, and CRhRdkBasicMaterialBase.

◆ MakeCopyForPreview()

virtual_su CRhRdkContent* CRhRdkContent::MakeCopyForPreview ( void  ) const

◆ MakeGroupInstance() [1/2]

virtual RDK_DEPRECATED CRhRdkContent* CRhRdkContent::MakeGroupInstance ( void  )
virtual

This method is deprecated in favor of the one below.

◆ MakeGroupInstance() [2/2]

virtual CRhRdkContent* CRhRdkContent::MakeGroupInstance ( void  ) const
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.

Note
The grouping will have no effect until the new instance is attached to the same document.
Returns
A grouped instance of the content hierarchy.

◆ NewChildSlotIterator()

virtual CChildSlotIterator* CRhRdkContent::NewChildSlotIterator ( CSIContext  context) const
virtual
Returns
An iterator for accessing child slot information or null if not implemented. The caller shall delete the iterator.

Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, and CRhRdkOneColorTextureBase.

◆ NewPreviewBackground()

virtual class CRhRdkPreviewBackground* CRhRdkContent::NewPreviewBackground ( void  ) const
pure virtual

◆ NewPreviewGeometry()

virtual class CRhRdkPreviewGeometry* CRhRdkContent::NewPreviewGeometry ( void  ) const
pure virtual

◆ NewPreviewSceneServer()

virtual class IRhRdkPreviewSceneServer* CRhRdkContent::NewPreviewSceneServer ( const class CRhRdkSSData data) const
pure virtual

This is an advanced method which you can override in exceptional circumstances.

Parameters
datais private RDK data. For example, you could call RhRdkNew3DPreviewSceneServer() from your override to preview your content (texture) in 3D.

◆ NextSibling()

virtual const CRhRdkContent* CRhRdkContent::NextSibling ( void  ) const
virtual
Returns
First sibling of this content or null if none.

◆ Notes()

virtual ON_wString CRhRdkContent::Notes ( void  ) const
virtual
Returns
The content's notes.

◆ OnChildChanging()

virtual bool CRhRdkContent::OnChildChanging ( const CRhRdkContent pOldChild,
const CRhRdkContent pNewChild 
) const
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.

Returns
true unless you want to prevent the child from being changed.

◆ OnChildSlotChanged()

virtual bool CRhRdkContent::OnChildSlotChanged ( const wchar_t *  wszChildSlotName) const
virtual

Called when a child slot of the content has changed.

Parameters
wszChildSlotNameis the name of the child slot that has changed.
Note
The default implementation just returns false.
Returns
true if successful, else false.

Reimplemented in CRhRdkBasicMaterial.

◆ OnChildSlotChanging()

virtual bool CRhRdkContent::OnChildSlotChanging ( const wchar_t *  wszChildSlotName) const
virtual

Called when a child slot of the content is about to change.

Parameters
wszChildSlotNameis the name of the child slot that is about to change.
Note
The default implementation just returns false.
Returns
true if successful, else false.

Reimplemented in CRhRdkBasicMaterial.

◆ OnDocumentRegister()

virtual void CRhRdkContent::OnDocumentRegister ( void  ) const
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.

◆ OnDocumentUnregister()

virtual void CRhRdkContent::OnDocumentUnregister ( void  ) const
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.

◆ OnExtraRequirementButtonClicked()

virtual bool CRhRdkContent::OnExtraRequirementButtonClicked ( const wchar_t *  wszParamName,
const wchar_t *  wszButtonName 
)
virtual

Optionally override this method to handle an extra UI requirements button click. Please be sure to call the base class.

Parameters
wszParamNameThe name of the content parameter for which a button was clicked.
wszButtonNameThe name of the button that was clicked.
Returns
true if button click was handled successfully, else false.

Implements IAutoUIExtraRequirements.

◆ OnFieldChanged()

virtual void CRhRdkContent::OnFieldChanged ( const class CRhRdkContentField field,
const CRhRdkVariant vOldValue,
RhRdkChangeContext  cc,
void *  pReserved 
)
virtual

Optionally override this method to find out when a content field changes. If you override this method you must call the base class.

Parameters
fieldis the field that changed.
vOldValueis the old value of the field.
ccis the context of the change.
pReservedis reserved for future use.

◆ OpenInFirstMainModelessEditor()

virtual_su bool CRhRdkContent::OpenInFirstMainModelessEditor ( void  ) const

◆ OpenInMainEditor()

virtual bool CRhRdkContent::OpenInMainEditor ( 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.

Returns
true if successful, else false.

◆ OpenInModalEditor()

virtual RDK_DEPRECATED bool CRhRdkContent::OpenInModalEditor ( UINT  uFlags = 0)
virtual
Returns
This method is deprecated in favor of Edit().

◆ ParameterSerializationMethod()

virtual ParamSerialMethod CRhRdkContent::ParameterSerializationMethod ( void  ) const
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.

Note
Using GetSet is the easiest and preferred way to serialize the parameters, and it is required if you want your content to animate in Bongo 2.

Implemented in CRhRdkBasicMaterial, CRhRdkCoreContent, and CRhRdkTexture.

◆ ParamNameFromChildSlotName()

virtual ON_wString CRhRdkContent::ParamNameFromChildSlotName ( const wchar_t *  wszChildSlotName) const
virtual
Returns
The parameter name corresponding to a child slot-name.

Reimplemented in CRhRdkBasicMaterial.

◆ Parent()

virtual const CRhRdkContent* CRhRdkContent::Parent ( void  ) const
virtual
Returns
Parent content or null if this is the top level object.

◆ PlugInId()

virtual UUID CRhRdkContent::PlugInId ( void  ) const
pure virtual
Returns
The plug-in's Rhino plug-in id.

Implemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.

◆ PreviewBackgroundFlags()

virtual UINT CRhRdkContent::PreviewBackgroundFlags ( void  ) const
pure virtual
Returns
Bit-flags denoting supported preview background types.

Implemented in CRhRdkTexture, CRhRdkEnvironment, and CRhRdkMaterial.

◆ PreviewGeometryFlags()

virtual UINT CRhRdkContent::PreviewGeometryFlags ( void  ) const
pure virtual
Returns
Bit-flags denoting supported preview geometry types.

Implemented in CRhRdkTexture, CRhRdkEnvironment, and CRhRdkMaterial.

◆ PreviewLightingFlags()

virtual UINT CRhRdkContent::PreviewLightingFlags ( void  ) const
pure virtual
Returns
Bit-flags denoting supported preview lighting types.

Implemented in CRhRdkTexture, CRhRdkEnvironment, and CRhRdkMaterial.

◆ PreviewSceneType()

virtual ePreviewSceneType CRhRdkContent::PreviewSceneType ( void  ) const
pure virtual

This is an advanced method which you can override in exceptional circumstances.

Returns
texture_2d_image if you want RDK to produce a texture preview from the texture evaluator or preview_scene_server to cause RDK to call NewPreviewSceneServer().

Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.

◆ PreviewUpdateDelay()

virtual int CRhRdkContent::PreviewUpdateDelay ( void  ) const
virtual
Returns
The delay before the thumbnail preview is updated. Override this to change the time it takes before a new preview is generated after a change to the content.

Reimplemented in CRhRdkTexture.

◆ Promote()

virtual_su void CRhRdkContent::Promote ( void  )

◆ ProxyType()

virtual ProxyTypes CRhRdkContent::ProxyType ( void  ) const
virtual

◆ RdkDocumentAssoc()

virtual const CRhRdkDocument* CRhRdkContent::RdkDocumentAssoc ( void  ) const
virtual

◆ RdkDocumentId()

virtual UUID CRhRdkContent::RdkDocumentId ( void  ) const
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.

Note
This identifies the document that the content is associated with. Just being associated with a document does not mean the content is actually attached to that document. You must call IsOwnedByDocument() to find out if the content is attached to and managed by a document. Clones and copies of content are not attached to a document, but they are still associated with the same document as the content they were cloned/copied from.
Returns
The unique identifier of the RDK document that the content hierarchy is associated with, or nil if the content hierarchy is not associated with a document.

◆ RdkDocumentOwner()

virtual const CRhRdkDocument* CRhRdkContent::RdkDocumentOwner ( void  ) const
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.

Returns
A pointer to the RDK document that the content hierarchy is owned by, or null if the content hierarchy is not owned by a document.

◆ RdkDocumentRegistered()

virtual const RDK_DEPRECATED CRhRdkDocument* CRhRdkContent::RdkDocumentRegistered ( void  ) const
virtual
Deprecated:
This method is obsolete.

◆ ReadParametersFromSection()

virtual bool CRhRdkContent::ReadParametersFromSection ( const IRhRdk_XMLSection section,
ReadParamsContext  context 
)
virtual

Implement this method to set the content's parameters from an XML section.

Parameters
sectionis the section to read the parameters from.
contextgives the reason the method is being called.
See also
ParameterSerializationMethod().
Returns
true if you successfully set the parameters.

Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, CRhRdkOneColorTextureBase, CRhRdkCoreContent, and CRhRdkTexture.

◆ ReadParameterXMLStream() [1/2]

virtual RDK_DEPRECATED bool CRhRdkContent::ReadParameterXMLStream ( const wchar_t *  wszStream,
eGetParamsContext  context 
)
virtual

This method is deprecated in favor of the one below.

◆ ReadParameterXMLStream() [2/2]

virtual bool CRhRdkContent::ReadParameterXMLStream ( const wchar_t *  wszStream,
ReadParamsContext  context 
)
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.

Parameters
contextgives the reason the method is being called.
See also
ParameterSerializationMethod().
Returns
true on success, else false.

◆ ReadSimulationXMLStream()

virtual bool CRhRdkContent::ReadSimulationXMLStream ( wchar_t *  wszStream)
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.

Returns
true on success, else false.

◆ ReadXMLStream() [1/2]

RDK_DEPRECATED bool CRhRdkContent::ReadXMLStream ( const wchar_t *  wszStream)

This method is deprecated in favor of the one below.

◆ ReadXMLStream() [2/2]

virtual bool CRhRdkContent::ReadXMLStream ( const wchar_t *  wszStream,
const CRhinoFileReadOptions pOptions 
)
virtual

Set the object's parameters from the supplied stream. Also causes the construction of child objects if they exist in the stream.

Returns
true if successful, otherwise false.

◆ ReleaseAllEditorUIs()

virtual void CRhRdkContent::ReleaseAllEditorUIs ( const UUID &  uuidEditor,
bool  bIncludeChildren 
) const
pure virtual

For expert use only. You should never need to override this method.

Implemented in CRhRdkCoreContent.

◆ ReleaseAllUIs()

virtual void CRhRdkContent::ReleaseAllUIs ( bool  bIncludeChildren) const
pure virtual

For expert use only. You should never need to override this method.

Implemented in CRhRdkCoreContent.

◆ RemoveFromDocumentList()

virtual bool CRhRdkContent::RemoveFromDocumentList ( CRhRdkDocument rdkDoc)
virtual

◆ RemoveRdkDocumentAssoc()

virtual bool CRhRdkContent::RemoveRdkDocumentAssoc ( void  )
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.

Note
If the content is not associated with a document, or is attached to a document, the method will fail.
Returns
true if successful, else false.

◆ RenderCRC() [1/3]

virtual unsigned int CRhRdkContent::RenderCRC ( const CRenderCRCFlags rcrcFlags) const
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.

Parameters
rcrcFlagsspecifies optional flags that control the generation of the crc.
Note
If you are not running on the main thread, you must exclude linear workflow and you must not exclude units, because this would access the document which is only allowed on the main thread.
See also
ComputeRenderCRC()
Changed()
RenderCRC(const CRenderCRCFlags& rcrcFlags, const ON_LinearWorkflow& lw)

◆ RenderCRC() [2/3]

RDK_DEPRECATED unsigned int CRhRdkContent::RenderCRC ( const CRenderCRCFlags rcrcFlags,
const IRhRdkLinearWorkflow lw 
) const

This function is deprecated in favor of the one below.

◆ RenderCRC() [3/3]

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.

◆ RenderEngineId()

virtual UUID CRhRdkContent::RenderEngineId ( void  ) const
pure virtual
Returns
The plug-in's render engine id.

Implemented in CRhRdkBasicMaterial, and CRhRdkOneColorTextureBase.

◆ ResetParametersToDefaults()

virtual void CRhRdkContent::ResetParametersToDefaults ( const ON_ClassArray< ON_wString > &  aParams)
virtual

Reset selected parameters to default values.

Parameters
aParamsis an array of internal names of parameters that require resetting.
Note
If aParams is empty, all parameters will be reset.

◆ ResetUseCount()

virtual RDK_DEPRECATED void CRhRdkContent::ResetUseCount ( void  ) const
virtual

Obsolete. Not implemented.

◆ ResolveRelativePaths()

virtual void CRhRdkContent::ResolveRelativePaths ( const wchar_t *  wszPathToFile)
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.

◆ ResolveURLPaths()

virtual void CRhRdkContent::ResolveURLPaths ( bool  bForceDownload = false)
virtual

◆ SavedCSN()

ON_wString CRhRdkContent::SavedCSN ( void  ) const

◆ SaveToLibraryFile() [1/2]

virtual RDK_DEPRECATED bool CRhRdkContent::SaveToLibraryFile ( const ON_wString sFullPath,
const IRhRdkPreviewSceneServer pSceneServer 
) const
virtual

This method is deprecated in favor of the one below.

◆ SaveToLibraryFile() [2/2]

virtual bool CRhRdkContent::SaveToLibraryFile ( const ON_wString sFullPath,
const IRhRdkPreviewSceneServer pSceneServer,
EmbedFilesChoice  c 
) const
virtual

Save the content to a library file.

Parameters
sFullPathis the full path to the library file to be created.
pSceneServeris a scene server that defines the scene for the preview rendering.
cis a choice for how embedded files are handled.
Returns
true on success, else false.

◆ SaveToLibraryFile_Internal()

virtual bool CRhRdkContent::SaveToLibraryFile_Internal ( const wchar_t *  wszFullPath,
const IRhRdkPreviewSceneServer pSceneServer,
bool  bEmbedFiles 
) const
virtual

◆ SetAutoDelete()

virtual void CRhRdkContent::SetAutoDelete ( bool  bAutoDelete)
virtual

Set if the content hierarchy should be auto-deleted when not in use.

◆ SetChild()

virtual bool CRhRdkContent::SetChild ( const CRhRdkContent pChild,
const wchar_t *  wszChildSlotName 
)
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.

Parameters
pChildis 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.
wszChildSlotNameis 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.
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.

◆ SetChildSlotAmount()

virtual bool CRhRdkContent::SetChildSlotAmount ( const wchar_t *  wszChildSlotName,
double  dPercent 
)
virtual

Set the amount of the specified child slot.

Parameters
wszChildSlotNameis the child slot to set the amount for.
dPercentis the amount to set the child slot to in the range 0 to 100.
Returns
true if successful, else false.

◆ SetChildSlotName()

virtual void CRhRdkContent::SetChildSlotName ( const wchar_t *  wszChildSlotName)
virtual

Set the child slot name of this content.

◆ SetChildSlotOn()

virtual bool CRhRdkContent::SetChildSlotOn ( const wchar_t *  wszChildSlotName,
bool  bOn 
)
virtual

Set the 'on' state of the specified child slot.

Parameters
wszChildSlotNameis the child slot to set the state of.
bOnis the state to set the child slot to.
Returns
true if successful, else false.

◆ SetContextFromChangeContext()

static SetContext CRhRdkContent::SetContextFromChangeContext ( RhRdkChangeContext  cc)
static

Convert RhRdkChangeContext to IAutoUIExtraRequirements::SetContext.

◆ SetCRCCache()

virtual RDK_DEPRECATED void CRhRdkContent::SetCRCCache ( DWORD  dwCRC) const
virtual

This method is deprecated and no longer called. For more information

See also
ComputeRenderCRC()

◆ SetDocumentAssoc() [1/2]

virtual bool CRhRdkContent::SetDocumentAssoc ( const CRhinoDoc doc) const
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.

Note
If the content is already associated with a document, the method will fail.
Returns
true if successful, else false.

◆ SetDocumentAssoc() [2/2]

virtual_su bool CRhRdkContent::SetDocumentAssoc ( const CRhRdkContent source) const

Similar to the above function, but uses another content as the source. As this doesn't access documents directly, but only copies the document ID, this is safe when used off the main thread.

◆ SetExtraRequirementParameter()

virtual bool CRhRdkContent::SetExtraRequirementParameter ( const wchar_t *  wszParamName,
const wchar_t *  wszExtraReqName,
const CRhRdkVariant vValue,
SetContext  sc 
)
virtual

Optionally override this method to set a parameter for extra UI requirements. Please be sure to call the base class.

Parameters
wszParamNameThe name of the content parameter for which to set an extra requirement parameter.
See also
ParamNameFromChildSlotName() which is relevant when addressing child slots.
Parameters
wszExtraReqNameThe name of the extra requirement parameter to be set.
vValueContains the new value for the specified extra req. parameter.
scThe context in which the set operation is being performed.
Returns
true if the parameter was set successfuly, else false.

Implements IAutoUIExtraRequirements.

Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, and CRhRdkOneColorTextureBase.

◆ SetGroupId()

virtual void CRhRdkContent::SetGroupId ( const UUID &  uuidGroup) const
virtual

◆ SetHidden() [1/2]

virtual void CRhRdkContent::SetHidden ( bool  bHidden)
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 (

See also
Edit()). They also appear in 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 contents are not listed. Hidden contents, being part of the document content list, will be listed by any scripts or other code that iterates over the document content list.
Note
This method is designed to be used when you want to show and hide a content at will. If you are the author of the content and you want it to be permanently hidden, it is recommended that you override IsHidden() and return true. Calls to SetHidden() are then ignored.

◆ SetHidden() [2/2]

RDK_DEPRECATED void CRhRdkContent::SetHidden ( bool  bHidden,
eChangeContext  cc 
)

This method is deprecated in favor of the one below.

◆ SetInstanceId()

virtual void CRhRdkContent::SetInstanceId ( UUID  uuidInstance)
virtual

Set the unique instance id of this instance.

◆ SetInstanceName() [1/2]

virtual void CRhRdkContent::SetInstanceName ( const wchar_t *  wszName)
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.

Parameters
wszNameis the new name. If you override this method, please be sure to call the base class.

Reimplemented in CRhRdkMaterial.

◆ SetInstanceName() [2/2]

virtual_su void CRhRdkContent::SetInstanceName ( const wchar_t *  wszName,
bool  bRenameEvents,
bool  bEnsureNameUnique 
)

◆ SetInstanceNameImpl() [1/2]

virtual void CRhRdkContent::SetInstanceNameImpl ( const wchar_t *  wszName,
bool  bRenameEvents 
)
virtual

◆ SetInstanceNameImpl() [2/2]

virtual_su void CRhRdkContent::SetInstanceNameImpl ( const wchar_t *  wszName,
bool  bRenameEvents,
bool  bEnsureNameUnique 
)

◆ SetIsReference()

virtual RDK_DEPRECATED void CRhRdkContent::SetIsReference ( bool  b)
virtual

Obsolete. Not implemented.

◆ SetIsRenderCRCRecursive()

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.

See also
RenderCRC().

◆ SetIsRhinoObjectSelected()

virtual void CRhRdkContent::SetIsRhinoObjectSelected ( bool  bSelected) const
virtual

◆ SetLocked()

virtual void CRhRdkContent::SetLocked ( void  )
virtual

Set this content as locked. This method must only be called once, before the content is added to a document.

◆ SetNotes() [1/2]

virtual void CRhRdkContent::SetNotes ( const wchar_t *  wszNotes)
virtual

Set the content's notes.

Parameters
wszNotescan be any text.
Note
If the notes do not change, the method has no effect.
If the content is attached to a document, an undo record is created.

◆ SetNotes() [2/2]

RDK_DEPRECATED void CRhRdkContent::SetNotes ( const wchar_t *  wszNotes,
bool  bSendEvents 
)

This method is deprecated in favor of the one below.

◆ SetParameter() [1/2]

virtual bool CRhRdkContent::SetParameter ( const wchar_t *  wszName,
const CRhRdkVariant vValue 
)
virtual

◆ SetParameter() [2/2]

virtual RDK_DEPRECATED bool CRhRdkContent::SetParameter ( const wchar_t *  wszName,
const CRhRdkVariant vValue,
eChangeContext  cc 
)
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.

◆ SetParameters()

virtual RDK_DEPRECATED bool CRhRdkContent::SetParameters ( class IRhRdk_XMLSection section,
eSetParamsContext  context 
) const
virtual

This method is deprecated in favor of WriteParametersToSection().

◆ SetRdkDocumentAssoc()

virtual bool CRhRdkContent::SetRdkDocumentAssoc ( const CRhRdkDocument rdkDoc)
virtual

◆ SetRdkDocumentOwner()

virtual bool CRhRdkContent::SetRdkDocumentOwner ( CRhRdkDocument pRdkDoc)
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.

Parameters
pRdkDocis 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.
Note
Document contents are held in a 'persistent content list' and are visible in any UI that is displaying that document's persistent content lists.
See also
CRhRdkContent::IsOwnedByDocument().
CRhRdkContent::RdkDocumentOwner().
CRhRdkDocument::MaterialList().
CRhRdkDocument::EnvironmentList().
CRhRdkDocument::TextureList().
Returns
true if successful, else false.

◆ SetSimulation()

virtual bool CRhRdkContent::SetSimulation ( IRhRdk_XMLSection section) const
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.

◆ SetTags()

virtual void CRhRdkContent::SetTags ( const wchar_t *  wszTags,
bool  bSendEvents = true 
)
virtual

Set the content's tags.

Parameters
wszTagsis a semicolon-delimited string of tags.
bSendEventsis true to send events, else false.
Note
If the tags do not change, the method has no effect.
If the content is attached to a document, an undo record is created.

◆ SmartUngroupRecursive()

virtual bool CRhRdkContent::SmartUngroupRecursive ( void  )
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.

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.
Returns
true if a content was ungrouped, false if no content or child was part of a group.

◆ SupportsCommand()

virtual bool CRhRdkContent::SupportsCommand ( UUID  uuidCommand) const
virtual

Indicates whether or not the content supports a particular command.

Parameters
uuidCommandis the UUID of the command.
Returns
true if the command is supported, else false.

◆ SupportsContextHelp()

virtual bool CRhRdkContent::SupportsContextHelp ( void  ) const
virtual
Returns
true if this content supports context-sensitive help.

Reimplemented in CRhRdkBasicMaterial.

◆ Tags()

virtual ON_wString CRhRdkContent::Tags ( void  ) const
virtual
Returns
The content's tags.

◆ ToON_RenderContent()

ON_RenderContent* CRhRdkContent::ToON_RenderContent ( bool  bRecursive = true) const

Creates a new ON_RenderContent from this CRhRdkContent.

◆ TopLevel() [1/2]

virtual CRhRdkContent& CRhRdkContent::TopLevel ( void  )
virtual
Returns
The top level parent of this non-const content.

◆ TopLevel() [2/2]

virtual const CRhRdkContent& CRhRdkContent::TopLevel ( void  ) const
virtual
Returns
The top level parent of this const content.

◆ TopLevelParent() [1/2]

virtual CRhRdkContent* CRhRdkContent::TopLevelParent ( void  )
virtual
Returns
A pointer to the top level parent of this non-const content. Never returns null.

◆ TopLevelParent() [2/2]

virtual const CRhRdkContent* CRhRdkContent::TopLevelParent ( void  ) const
virtual
Returns
A pointer to the top level parent of this const content. Never returns null.

◆ TransferUIsFrom()

virtual void CRhRdkContent::TransferUIsFrom ( const CRhRdkContent c)
pure virtual

Implemented in CRhRdkCoreContent.

◆ TypeDescription()

virtual ON_wString CRhRdkContent::TypeDescription ( void  ) const
pure virtual
Returns
The localized description of the content type.

Implemented in CRhRdkBasicMaterial.

◆ TypeId()

virtual UUID CRhRdkContent::TypeId ( void  ) const
pure virtual
Returns
The unique id of the content type.

Implemented in CRhRdkBasicMaterial.

◆ TypeName()

virtual ON_wString CRhRdkContent::TypeName ( void  ) const
pure virtual
Returns
The localized name of the content type.

Implemented in CRhRdkBasicMaterial.

◆ UI()

virtual RDK_DEPRECATED class IRhRdkExpandableContentUI* CRhRdkContent::UI ( void  ) const
pure virtual

This method is deprecated in favor of the one below.

Implemented in CRhRdkCoreContent.

◆ Ungroup() [1/2]

virtual RDK_DEPRECATED bool CRhRdkContent::Ungroup ( void  )
virtual

This method is deprecated in favor of the one below.

◆ Ungroup() [2/2]

virtual bool CRhRdkContent::Ungroup ( void  ) const
virtual

Remove this content from any instance group it may be a member of. Does not record undo but does send the OnContentGroupIdChanged event.

Returns
true if content was ungrouped, false if it was not part of a group.

◆ UngroupRecursive() [1/2]

virtual RDK_DEPRECATED bool CRhRdkContent::UngroupRecursive ( void  )
virtual

This method is deprecated in favor of the one below.

◆ UngroupRecursive() [2/2]

virtual bool CRhRdkContent::UngroupRecursive ( void  ) const
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.

Returns
true if a content was ungrouped, false if no content or child was part of a group.

◆ Uninitialize()

virtual void CRhRdkContent::Uninitialize ( void  )
virtual

Override this to uninitialize your content. Please be sure to call the base class after calling any other methods in your override.

Note
This method should only be called if Initialize() returned true.

◆ UninitializeAndDelete()

static void CRhRdkContent::UninitializeAndDelete ( CRhRdkContent pContent)
static

◆ UpdateDocumentTables()

virtual bool CRhRdkContent::UpdateDocumentTables ( void  ) const
pure virtual

Called by Changed() to update Rhino document tables.

Returns
true if successful, else false.

Implemented in CRhRdkTexture, CRhRdkMaterial, and CRhRdkEnvironment.

◆ UpdatePreview()

virtual void CRhRdkContent::UpdatePreview ( void  ) const
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.

Note
The preview is only updated if the relevant thumbnail display has its Automatic Update option set. If this option is not set, the preview will not be updated until the user takes action to update it manually.

◆ UpdateUI()

virtual RDK_DEPRECATED void CRhRdkContent::UpdateUI ( void  ) const
virtual

This method is deprecated in favor of the data source event system. It is no longer called.

◆ UseCount()

virtual int CRhRdkContent::UseCount ( void  ) const
virtual
Returns
the number of times the content is in use. Contents can be used by objects, layers or the Ground Plane.

◆ VerifyCopy()

virtual void CRhRdkContent::VerifyCopy ( const CRhRdkContent pCopy) const
virtual

Call this when your override of MakeCopy() calls FastMakeCopy().

See also
FastMakeCopy().

◆ ViewDefaults()

virtual RDK_DEPRECATED const class IRhRdkThumbViewDefaults* CRhRdkContent::ViewDefaults ( void  ) const
virtual

This method is deprecated in favor of AppearanceDefaults()

◆ WriteParametersToSection()

virtual bool CRhRdkContent::WriteParametersToSection ( IRhRdk_XMLSection section,
WriteParamsContext  context 
) const
virtual

Implement this method to get the content's parameters into an XML section.

Parameters
sectionis the section to write the parameters to.
contextgives the reason the method is being called.
See also
ParameterSerializationMethod().
Returns
true if you successfully get the parameters.

Reimplemented in CRhRdkBasicMaterial, CRhRdkTwoColorTextureBase, CRhRdkOneColorTextureBase, CRhRdkCoreContent, and CRhRdkTexture.

◆ WriteParameterXMLStream() [1/2]

virtual RDK_DEPRECATED DWORD CRhRdkContent::WriteParameterXMLStream ( wchar_t *  wszStream,
DWORD  dwMaxChars,
eSetParamsContext  context 
) const
virtual

This method is deprecated in favor of the one below.

◆ WriteParameterXMLStream() [2/2]

virtual size_t CRhRdkContent::WriteParameterXMLStream ( wchar_t *  wszStream,
size_t  maxChars,
WriteParamsContext  context 
) const
virtual
Note
It is highly recommended that you use WriteParametersToSection() instead of this method because the registerable properties system (used by Bongo 2 for animation) will require it. Instead of overriding WriteParametersToSection() you can override this method to directly write the content's parameter 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, maxChars 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.
Your XML must be contained within a section called
 <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.

Parameters
wszStreamThe buffer to be filled with XML text. Only write the text, there is no need to write a zero terminator.
maxCharsThe physical number of characters that the buffer can accomodate.
contextgives the reason the method is being called.
See also
ParameterSerializationMethod().
Returns
Logical number of characters written. This will be more than maxChars if the buffer was not big enough.

◆ WriteSimulationXMLStream()

virtual size_t CRhRdkContent::WriteSimulationXMLStream ( wchar_t *  wszStream,
size_t  maxChars 
) const
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.

Note
Your XML must be contained within a section called
<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.

Parameters
wszStreamThe buffer to be filled with XML text. Only write the text, there is no need to write a zero terminator.
maxCharsThe physical number of characters that the buffer can accomodate.
Returns
Logical number of characters written. This will be more than dwMaxChars if the buffer was not big enough.

◆ WriteXMLStream() [1/2]

virtual RDK_DEPRECATED DWORD CRhRdkContent::WriteXMLStream ( wchar_t *  wszStream,
DWORD  dwMaxChars,
eSetParamsContext  context 
) const
virtual

This method is deprecated in favor of the one below.

◆ WriteXMLStream() [2/2]

virtual size_t CRhRdkContent::WriteXMLStream ( wchar_t *  wszStream,
size_t  maxChars,
WriteParamsContext  context,
const CRhinoFileWriteOptions pOptions 
) const
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.

Parameters
wszStreamThe buffer to be filled with XML text.
maxCharsThe physical number of characters that the buffer can accomodate.
contextgives the reason the method is being called.
pOptionsis for future use.
Returns
The logical number of characters written. This will be more than maxChars if the buffer was not big enough.