BaseContainer and Description
indexofrefraction last edited by s_bach
i noticed that you can examine any c4d object by checking its bc or description.
what i dont understand is the purpose of each of them and their relation to each other...
is it possible to get a small summary on this? :)
BaseContaineris a generic data container that can store internal data of an object.
Descriptionis the description of the object's parameters. These parameters are displayed in the GUI (Attribute Manager) in order to enable user interaction.
Short: BaseContainer is data, Description is GUI.
Typically a parameter in the description corresponds to a value in the object's BaseContainer. So if you edit a string parameter on an object in the Attribute Manager, that string value is stored in the object's BaseContaienr.
But this may not always be the case.
It can happen that an object stores some internal data in the BaseContainer that should not be displayed in the Attribute Manager as a parameter. Then there is no corresponding Description element.
It can also happen that there is a parameter in the Description that does not correspond to any value in the BaseContainer. Either because the value is somehow temporary or the value is stored differently.
Because of this you should not access an object's values by using its BaseContainer. If possible, always access the parameters of an object using
SetParameter(). These functions know if the given parameter is stored in the BaseContainer or not.
Basic information on these topics can be found here:
More advanced information is found here:
- NodeData::GetDDescription() Manual
- NodeData::SetDParameter() Manual
- NodeData::GetDParameter() Manual
Just a hint: When you create a new post, please also add tags so we know the context of your question.
indexofrefraction last edited by
thank you sebastian,
this is a really helpful overview!