Hello,
I am trying to create an enum data type with some values (options) added but I can't get the options added to this data type.
When setting DESCRIPTION::DATA::BASE::ENUM
it requires an maxon::Array<Tuple<Id, Data>>
as a value type, but even if I create a variable of that type and add some values, its size does not change and stays 0.
I also tried using BlockToEnumArray()
but that would return an BaseArray<Tuple<Id, Data>>
which is not accepted in DESCRIPTION::DATA::BASE::ENUM
although the comments in the function say it does.
//----------------------------------------------------------------------------------------
/// Converts a given Block<TYPE> to a enum list array to use with DESCRIPTION::DATA::BASE::ENUM.
/// @param[in] enumBlock Block to convert into a array.
/// @return BaseArray on success.
//----------------------------------------------------------------------------------------
template <typename TYPE> inline Result<BaseArray<Tuple<Id, Data>>> BlockToEnumArray(const Block<TYPE>& enumBlock)
Also converting BaseArray<Type> to Array<Type> did not work.
I'm not sure what I am doing wrong.
Thank you.