Hide Description elements

Using the NodeData::GetDDescription() we can add, hide or modify elements in the Description of a BaseList2D object.

Here we show how to hide (or unhide) an element. This is useful if certain description elements should only be visible if the user selected a certain option.

The function

// Shows or hides a description from the node.
Bool ShowDescriptionElement(GeListNode *node, Description *descr, LONG MyDescID, Bool show)
  AutoAlloc<AtomArray> ar; if(!ar) return FALSE;

  BaseContainer *bc = descr->GetParameterI(DescLevel(MyDescID), ar);
    bc->SetBool(DESC_HIDE, !show);
    return FALSE;

  return TRUE;


The following code will hide/show either one parameter or two others, depending on the value of TMYEXPRESSIONTAG_MODE.

// Dynamic description
Bool MyExpressionTag::GetDDescription(GeListNode *node, Description *description, DESCFLAGS_DESC& flags)
  // Load description (user interface)
  if (!description->LoadDescription(Tmyepressiontag)) return FALSE;

  BaseContainer *bc = ((BaseTag*)node)->GetDataInstance();

  ShowDescriptionElement(node, description, TMYEXPRESSIONTAG_SIMPLE_PARAMETER, simplemode);
  ShowDescriptionElement(node, description, TMYEXPRESSIONTAG_COMPLEX_PARAMETER_1, !simplemode);
  ShowDescriptionElement(node, description, TMYEXPRESSIONTAG_COMPLEX_PARAMETER_2, !simplemode);

  return TRUE;

Frank Willeke

worked with computers since more than 20 years | got hooked on computer graphics back on the AMIGA | started programming at the age of 13 | relesed some successful plugins for cinema 4d | started working for maxon computer gmbh in 2009 | now contributing to cinema 4d as a senior developer making electronic music since 1993 | playing the electric guitar since 1995 age of 14 | first live gigs in 1997 | playing the bass guitar 2005 | playing keyboards and synths since 2012 experimenting with photography since 2003

Leave a Reply

Your email address will not be published. Required fields are marked *