Main Index :

Descriptions


From CINEMA 4D R8 most object, tag and material parameters are accessed from the Attributes manager. In the API the set of such parameters is called the description. With CINEMA 4D R9.5 it is possible to set description data with C.O.F.F.E.E..

Attributes manager

Syntax

[BaseList2D]#id
[BaseList2D]#id:subid
[BaseList2D]#id:subid:subsubid

All base list objects have a description. Each description element has an ID, normally available as a constant. You access the description element with the # operator as a above. Some examples:

obj#SWEEPOBJECT_SCALE = 0.5; // Sets the Scale of a Sweep NURBS to 50%
var x = obj#ID_BASEOBJECT_POSITION:VECTOR_X; // Assigns x the X coordinate of the object position

Finding the element ID

You don't have to remember all these IDs, nor look them up in tables. It is easy to get the ID and sub-ID for a description element using drag and drop within CINEMA 4D. Just open up the Attributes manager on the object you want and drag the element to the console window field:

Drag the element... ...and drop it in the console field.

This tells us that the ID of the Growth element is SWEEPOBJECT_GROWTH. You can also drag to the expression editor.

The temp() link

When you drag an element from the Attributes manager you automatically get a temporary reference to the host object, temp(19) above. The number refers to the index displayed in the contextual menu of the Attributes manager navigation:

Attributes popup

You can use this as a shortcut for setting or getting values with the console. Instead of having to type GetActiveDocument()->FindObject("Foo")#... = 0.5 you simply write for example temp(3)#.... Normally you don't have to write temp() at all since it's inserted automatically when you drag and drop from the Attributes manager.