THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/08/2009 at 06:43, xxxxxxxx wrote:
Here is a simple example, a material with one channel that you can switch on and off.
> \> CONTAINER Msimplematerial \> { \> NAME Msimplematerial; \> INCLUDE Mpreview; \> INCLUDE Mbase; \> \> GROUP Obaselist \> { \> GROUP \> { \> MATEDCOLUMNS 1; \> \> BOOL SIMPLEMATERIAL_USE_COLOR { PARENTMSG ID_SIMPLEMATERIALGROUP_COLOR; } \> } \> } \> \> GROUP ID_SIMPLEMATERIALGROUP_COLOR \> { \> COLOR SIMPLEMATERIAL_COLOR_COLOR { OPEN; } \> } \> \> INCLUDE Millum; \> INCLUDE Massign; \> } \>
> \> Bool SimpleMaterial::GetDDescription(GeListNode \*node, Description \*description, LONG &flags;) \> { \> if (!description->LoadDescription(node->GetType())) return FALSE; \> \> BaseContainer \*data=((PluginMaterial\* )node)->GetDataInstance(); \> \> BaseContainer bc = GetCustomDataTypeDefault(DTYPE_GROUP); \> \> if (data->GetBool(SIMPLEMATERIAL_USE_COLOR, TRUE)) \> { \> bc.SetBool(DESC_HIDE, FALSE); \> bc.SetString(DESC_SHORT_NAME, String("Color")); \> bc.SetString(DESC_NAME, String("Color")); \> \> if (!description->SetParameter(DescLevel(ID_SIMPLEMATERIALGROUP_COLOR,DTYPE_GROUP,0),bc,DescLevel(1000491))) return FALSE; \> } \> else \> { \> bc.SetBool(DESC_HIDE, TRUE); \> bc.SetString(DESC_SHORT_NAME, String("Color")); \> bc.SetString(DESC_NAME, String("Color")); \> \> if (!description->SetParameter(DescLevel(ID_SIMPLEMATERIALGROUP_COLOR,DTYPE_GROUP,0),bc,DescLevel(1000491))) return FALSE; \> } \> \> flags |= DESCFLAGS_DESC_LOADED; \> \> return SUPER::GetDDescription(node,description,flags); \> } \>
hope this helps
cheers,
Matthias