IUserData
Functions
void |
|
UserData * |
Detailed Description
-
class IUserData : public RED::IREDObject
This interface gives access to custom user data on scene graph objects.
@related class RED::UserData, class RED::UserDataRaw, Saving and Reloading a Custom Container
An object that implements the RED::IUserData interface may store custom application data. The data container is a derived class of the RED::UserData base class. REDsdk provides a default data container named RED::UserDataRaw for the storage of applicative data.
Note that there’s no need to use user data containers if the application data is just set to a single identifier value. In this case, the RED::Object::SetID method can be used to store a unique identifier associated to any REDsdk object deriving from RED::Object.
Several objects are implementing the RED::IUserData interface. Among them we find all shapes, viewpoints, materials and fonts. These are either created using the RED::Factory::CreateInstance call or using the RED::IResourceManager interface.
Public Functions
-
SET_CID(CID_class_REDIUserData)
-
virtual void SetUserData(RED::UserData *iUserData, bool iOwner) = 0
Sets the custom user data linked to the object.
Previously linked user data will be destroyed if the object has been declared as the data owner, otherwise they are notified of the unlink action by a call to their Unlink method.
- Parameters
iUserData – pointer to the user data.
iOwner – true if the object is responsible of deleting the user data when its destructor is called, false otherwise (call to RED::UserData::UnlinkFrom).
-
SET_CID(CID_class_REDIUserData)