Groups | |
COLOR | |
COLORA | |
CUSTOMGUI | |
DESC | |
DTYPE | |
VECTOR | |
VECTOR4D | |
Classes | |
struct | DescLevel |
class | DescID |
class | ConstDescIDMem< T > |
class | Description |
class | DynamicDescription |
struct | DescriptionBaseMessage |
struct | DescriptionCommand |
struct | DescriptionPopup |
struct | DescriptionCheckDragAndDrop |
struct | DescriptionInExDeleted |
struct | DescriptionInExAdded |
struct | DescriptionInExSelChanged |
struct | DescriptionCustomGuiNotification |
struct | DescriptionGetBitmap |
struct | DescriptionGetObjects |
struct | DescriptionAllowOverride |
struct | DescriptionTakeChanged |
struct | DescriptionImExportVerifySuffix |
struct | DescriptionImExportVerifyFilename |
Macros | |
#define | DESCID_ROOT |
#define | ID_USERDATA |
#define | DESCID_DYNAMICSUB |
#define | BOOL_PAGEMODE |
#define | VECTOR_NO_Z_COMPONENT |
#define | CUSTOMDATATYPE_DESCID |
#define | YDescLevel(A, B, C, ...) |
#define | XDescLevel(...) |
#define | AddDescX(t, i, a) |
#define | ConstDescID(...) |
#define | CreateDescID(...) |
Typedefs | |
using | Array = DescLevel[sizeof...(T)/3] |
Functions | |
DescriptionLib * | CheckDescriptionLib (Int32 offset) |
constexpr | DescLevel (Int32 t_id) |
constexpr | DescLevel (Int32 t_id, Int32 t_datatype, Int32 t_creator) |
Bool | operator== (const DescLevel &d) const |
Bool | operator!= (const DescLevel &d) const |
String | ToString (const maxon::FormatStatement *formatStatement=nullptr) const |
static const Array & | ToArray () |
Description () | |
~Description () | |
Bool | LoadDescription (const BCResourceObj *bc, Bool copy) |
Bool | LoadDescription (Int32 id) |
Bool | LoadDescription (const String &id) |
Bool | SortGroups () |
const BCResourceObj * | GetDescription () |
const BaseContainer * | GetParameter (const DescID &id, BaseContainer &temp, AtomArray *ar) const |
BaseContainer * | GetParameterI (const DescID &id, AtomArray *ar) |
Bool | SetParameter (const DescID &id, const BaseContainer ¶m, const DescID &groupid) |
void * | BrowseInit () const |
Bool | GetNext (void *handle, const BaseContainer **bc, DescID &id, DescID &groupid) const |
void | BrowseFree (void *&handle) const |
DescEntry * | GetFirst (const AtomArray &op) |
DescEntry * | GetNext (DescEntry *de) |
DescEntry * | GetDown (DescEntry *de) |
void | GetDescEntry (DescEntry *de, const BaseContainer **bc, DescID &descid) |
SubDialog * | CreateDialogI () |
void | FreeDialog (SubDialog *dlg) |
Bool | CreatePopupMenu (BaseContainer &menu) |
Bool | GetPopupId (Int32 id, const DescID &descid) |
Bool | CheckDescID (const DescID &searchid, const AtomArray &ops, DescID *completeid) |
Bool | GetSubDescriptionWithData (const DescID &did, const AtomArray &op, RESOURCEDATATYPEPLUGIN *resdatatypeplugin, const BaseContainer &bc, DescID *singledescid) |
const DescID * | GetSingleDescID () |
void | SetSingleDescriptionMode (const DescID &descid) |
DynamicDescription () | |
~DynamicDescription () | |
DescID | Alloc (const BaseContainer &datadescription) |
Bool | Set (const DescID &descid, const BaseContainer &datadescription, BaseList2D *bl) |
const BaseContainer * | Find (const DescID &descid) const |
Bool | Remove (const DescID &descid) |
Bool | CopyTo (DynamicDescription *dest) const |
void * | BrowseInit () |
const void * | BrowseInit () const |
Bool | BrowseGetNext (void *handle, DescID *id, const BaseContainer **data) |
Bool | BrowseGetNext (const void *handle, DescID *id, const BaseContainer **data) const |
void | BrowseFree (void *&handle) |
void | BrowseFree (const void *&handle) const |
Bool | FillDefaultContainer (BaseContainer &res, Int32 type, const String &name) |
UInt32 | GetDirty () const |
Bool | Description_Register (Int32 id, const String &idstr, LocalResource *res) |
Variables | |
Int32 | id |
Int32 | dtype |
Int32 | creator |
maxon::StrongCOWRef< Int > _refData | |
maxon::Block< const DescLevel > _constData | |
union { | |
maxon::StrongCOWRef< Int > _refData | |
maxon::Block< const DescLevel > _constData | |
}; | |
static constexpr Int32 | _ids [] |
Constructor/Destructor | |
DescID () | |
DescID (const DescID &src) | |
DescID (DescID &&src) | |
template<int elementCount> | |
constexpr | DescID (maxon::IN_PLACE_TYPE v, const DescLevel(&ids)[elementCount]) |
DescID (maxon::IN_PLACE_TYPE v, const maxon::Block< const DescLevel > &ids) | |
template<typename... T> | |
static DescID | Create (const T &... ids) |
~DescID () | |
Set/Push/Pop Level | |
void | SetId (const DescLevel &subid) |
void | PushId (const DescLevel &subid) |
void | PushId (const std::initializer_list< DescLevel > &subids) |
void | PopId () |
Operator | |
const DescLevel & | operator[] (Int32 pos) const |
const DescID & | operator= (const DescID &id) |
const DescID & | operator= (DescID &&id) |
Bool | operator== (const DescID &d) const |
Bool | operator!= (const DescID &d) const |
const DescID | operator<< (Int32 shift) const |
const DescID & | operator+= (const DescID &s) |
const DescID | operator+ (const DescID &v1, const DescID &v2) |
Read/Write | |
Bool | Read (HyperFile *hf) |
Bool | Write (HyperFile *hf) const |
Miscellaneous | |
Int32 | GetDepth () const |
Bool | IsPopulated () const |
Bool | IsEmpty () const |
Bool | IsPartOf (const DescID &cmp, Int32 *pos) const |
maxon::HashInt | GetHashCode () const |
Alloc/Free | |
static Description * | Alloc () |
static void | Free (Description *&description) |
#define DESCID_ROOT |
Root description ID.
#define ID_USERDATA |
User data ID.
#define DESCID_DYNAMICSUB |
User data/dynamic parameters description level.
#define BOOL_PAGEMODE |
Page mode for boolean elements. If set it means that this boolean will have no checkbox. (Used for the Material Editor navigation.)
#define VECTOR_NO_Z_COMPONENT |
Private. Restricts the displayed vector to two instead of three components.
#define CUSTOMDATATYPE_DESCID |
DescID custom data type ID.
#define YDescLevel | ( | A, | |
B, | |||
C, | |||
... | |||
) |
#define XDescLevel | ( | ... | ) |
#define AddDescX | ( | t, | |
i, | |||
a | |||
) |
#define ConstDescID | ( | ... | ) |
#define CreateDescID | ( | ... | ) |
DescriptionLib* cinema::CheckDescriptionLib | ( | Int32 | offset | ) |
Constructor, specifying only the ID.
[in] | t_id | Initial value for id. |
Equality operator. Checks if description levels are equals i.e all vales are equal.
[in] | d | A description level to compare with. |
Inequality operator. Checks if description levels are not equal i.e any vales is different.
[in] | d | A description level to compare with. |
String ToString | ( | const maxon::FormatStatement * | formatStatement = nullptr | ) | const |
DescID | ( | ) |
Default constructor.
|
explicitconstexpr |
Creates an ID with any number of levels. Must be used only with ConstDescID or memory which is never deleted.
[in] | ids | array with DescLevels. |
|
explicit |
Creates an ID with any number of levels. Must be used only with ConstDescID or memory which is never deleted.
[in] | ids | array with DescLevels. |
|
static |
Creates an ID with any number of levels.
[in] | ids | array with DescLevels. |
~DescID | ( | ) |
Default destructor.
void SetId | ( | const DescLevel & | subid | ) |
Sets the highest level to subid.
[in] | subid | New top level. |
void PushId | ( | const DescLevel & | subid | ) |
Pushes a new level onto the stack.
[in] | subid | Level to push. |
void PushId | ( | const std::initializer_list< DescLevel > & | subids | ) |
Pushes a new level onto the stack.
[in] | subids | Levels to push. |
void PopId | ( | ) |
Pop the highest level from the stack.
Accesses the level at position pos in the stack.
[in] | pos | The position: 0 <= pos < GetDepth() |
Assignment operator. Assigns id to the description ID.
[in] | id | Right operand. Source description ID. |
Move Assignment operator. Assigns id to the description ID.
[in] | id | Right operand. Source description ID. |
Equality operator. Checks if all levels are equal.
[in] | d | Right operand description ID. |
Inequality operator. Checks if any level is different.
[in] | d | Right operand description ID. |
Get the result of popping levels from the bottom of the stack.
[in] | shift | Number of levels to pop. 0 <= shift < GetDepth(). |
Add operator. Merges two description IDs.
[in] | s | Right operand. Source description ID. |
Reads the description ID from hf.
[in] | hf | The hyper file to read from. The caller owns the pointed hyper file. |
Writes the description ID to hf.
[in] | hf | The hyper file to write to. The caller owns the pointed hyper file. |
Int32 GetDepth | ( | ) | const |
Gets the depth of the stack, i.e. the number of levels.
Bool IsPopulated | ( | ) | const |
Returns True if Id is set to any value.
Bool IsEmpty | ( | ) | const |
Returns True if Id is not set to any value.
Checks if the description ID is part of cmp and assigns the length of the match to pos.
[in] | cmp | The super description ID. |
[out] | pos | If not nullptr this is assigned the length of the match. |
maxon::HashInt GetHashCode | ( | ) | const |
Gets a hash code for the description ID.
|
static |
|
private |
|
private |
|
static |
|
static |
Loads a description from a BCResourceObj
, such as the one returned from GetDescription().
[in] | bc | The BCResourceObj to load the description from. |
[in] | copy | true if the description should be copied, otherwise the objects will share the same internal data so that changes to one affects the other. |
Loads a description by ID. The ID must have been registered with RegisterDescription().
[in] | id | The description ID, for example Obase . |
Loads a description by name. The description name must have been registered with RegisterDescription().
[in] | id | The description name, for example "Obase". |
Bool SortGroups | ( | ) |
Private.
const BCResourceObj* GetDescription | ( | ) |
Retrieves the internal pointer of the description.
const BaseContainer* GetParameter | ( | const DescID & | id, |
BaseContainer & | temp, | ||
AtomArray * | ar | ||
) | const |
Retrieves the information container for a description parameter.
[in] | id | The description ID. |
[out] | temp | When the parameter is of a dynamic type that does not already exist as predefined container, i.e. not returnable as pointer, the result is the address of temp, where temp allows to store the data. In this case nullptr is returned. |
[out] | ar | Most of the time this can be just AtomArray(). However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to. |
BaseContainer* GetParameterI | ( | const DescID & | id, |
AtomArray * | ar | ||
) |
Retrieves a pointer to the information container for a description parameter.
[in] | id | The description ID. |
[out] | ar | Most of the time this can be just AtomArray(). However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to. |
Bool SetParameter | ( | const DescID & | id, |
const BaseContainer & | param, | ||
const DescID & | groupid | ||
) |
Inserts a description parameter into the collection.
[in] | id | The description ID. |
[in] | param | The settings for the new parameter. |
[in] | groupid | The ID of the parameter's group, or DESCID_ROOT. |
void* BrowseInit | ( | ) | const |
Starts browsing the parameters linearly.
Bool GetNext | ( | void * | handle, |
const BaseContainer ** | bc, | ||
DescID & | id, | ||
DescID & | groupid | ||
) | const |
Retrieves the next parameter in a browse sequence initialized with BrowseInit().
[in] | handle | The browse handle returned by BrowseInit(). |
[out] | bc | Assigned the settings for the retrieved parameter. The caller owns the pointed base container. |
[out] | id | Assigned the ID of the retrieved parameter. |
[out] | groupid | Assigned the group ID of the retrieved parameter. |
void BrowseFree | ( | void *& | handle | ) | const |
Frees browse handles from BrowseInit().
[in,out] | handle | The handle to free. Assigned nullptr. |
DescEntry* GetFirst | ( | const AtomArray & | op | ) |
Gets a handle to the first description entry. Use GetDescEntry() to access the information and GetNext() or GetDown() to browse the hierarchy.
[in] | op | Most of the time this can be just AtomArray(). However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to. |
DescEntry* GetNext | ( | DescEntry * | de | ) |
Gets the next description entry handle.
[in] | de | The current description entry handle. |
DescEntry* GetDown | ( | DescEntry * | de | ) |
Gets the child description entry handle.
[in] | de | The current description entry handle. |
void GetDescEntry | ( | DescEntry * | de, |
const BaseContainer ** | bc, | ||
DescID & | descid | ||
) |
Retrieves the data for a description entry handle.
[in] | de | The current description entry handle. |
[out] | bc | Assigned the settings for the retrieved parameter. The caller owns the pointed base container. |
[out] | descid | Assigned the ID of the retrieved parameter. |
SubDialog* CreateDialogI | ( | ) |
Private.
void FreeDialog | ( | SubDialog * | dlg | ) |
Private.
Bool CreatePopupMenu | ( | BaseContainer & | menu | ) |
Builds a popup menu for choosing a parameter in the description.
[out] | menu | Assigned the menu container. |
Checks if a description ID searchid exists for the given objects ops (usually only one single object is passed as otherwise the smallest common nominator is returned).
If completeid != nullptr and the return value is true the complete ID will be assigned to completeid.
[in] | searchid | The partial ID. |
[in] | ops | Most of the time this can be just AtomArray(). However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to. |
[out] | completeid | Assigned the complete ID. |
Bool GetSubDescriptionWithData | ( | const DescID & | did, |
const AtomArray & | op, | ||
RESOURCEDATATYPEPLUGIN * | resdatatypeplugin, | ||
const BaseContainer & | bc, | ||
DescID * | singledescid | ||
) |
Retrieves dynamic sub-description data (e.g. the gradient data type).
[in] | did | The description ID. |
[in] | op | The current objects. |
[in] | resdatatypeplugin | The resource data type plug, retrieved with FindResourceDataTypePlugin(). |
[out] | bc | The existing container for the data type. |
[in] | singledescid | Should be nullptr. |
const DescID* GetSingleDescID | ( | ) |
Private.
void SetSingleDescriptionMode | ( | const DescID & | descid | ) |
Private.
|
private |
|
private |
DescID Alloc | ( | const BaseContainer & | datadescription | ) |
Allocates a new user data and return its ID.
[in] | datadescription | The settings of the new user data. |
Bool Set | ( | const DescID & | descid, |
const BaseContainer & | datadescription, | ||
BaseList2D * | bl | ||
) |
Inserts a new user data with the specified ID.
[in] | descid | The ID of the new user data. |
[in] | datadescription | The settings of the new user data. |
[in] | bl | TODO |
const BaseContainer* Find | ( | const DescID & | descid | ) | const |
Finds user data settings from its description ID.
[in] | descid | The ID of the user data. |
Removes user data by ID.
[in] | descid | The ID of the user data. |
Bool CopyTo | ( | DynamicDescription * | dest | ) | const |
Copies the dynamic description.
[in] | dest | The destination dynamic description. The caller owns the pointed dynamic description. |
void* BrowseInit | ( | ) |
Starts browsing the parameters linearly.
const void* BrowseInit | ( | ) | const |
Bool BrowseGetNext | ( | void * | handle, |
DescID * | id, | ||
const BaseContainer ** | data | ||
) |
Retrieves the next parameter in a browse sequence initialized with BrowseInit().
[in] | handle | The browse handle returned by BrowseInit(). |
[out] | id | Assigned the ID of the retrieved parameter. |
[out] | data | Assigned the settings for the retrieved parameter. The caller owns the pointed base container. |
Bool BrowseGetNext | ( | const void * | handle, |
DescID * | id, | ||
const BaseContainer ** | data | ||
) | const |
void BrowseFree | ( | void *& | handle | ) |
Frees browse handles from BrowseInit().
[in,out] | handle | The handle to free. Assigned nullptr. |
void BrowseFree | ( | const void *& | handle | ) | const |
Bool FillDefaultContainer | ( | BaseContainer & | res, |
Int32 | type, | ||
const String & | name | ||
) |
Fills the default settings container for a certain data type with the specified name.
[out] | res | Assigned the default settings. |
[in] | type | The datatype ID. Either a custom ID or one of: DTYPE. |
[in] | name | The name of the user data. |
UInt32 GetDirty | ( | ) | const |
Gets the dirty count. Can be used to check if something has changed.
Internal. Use RegisterDescription() instead.
Int32 id |
ID of the level.
Int32 creator |
Creator ID.
maxon::StrongCOWRef<Int> _refData |
maxon::StrongCOWRef<Int> _refData |
maxon::Block<const DescLevel> _constData |
maxon::Block<const DescLevel> _constData |
union { ... } |
|
staticconstexpr |