c4d.Description

New in version R15.037.

The description class contains information for all description IDs of an object. For example it stores a BaseContainer for ID_BASEOBJECT_POSITION that describes that this value is a Vector, has minimum and maximum values XYZ etc.

The information about each description parameter is stored in a BaseContainer with the following values:

Container ID Type Description

DESC_NAME

str

Name for standalone use.

DESC_SHORT_NAME

str

Short name, for attributes dialog.

DESC_VERSION

int

Show in versions:

DESC_VERSION_DEMO

Demo versions.

DESC_VERSION_XL

XL versions.

DESC_VERSION_ALL

All versions.

DESC_CHILDREN

BaseContainer

Internal.

DESC_MIN

any

The minimum value.

DESC_MAX

any

The maximum value.

DESC_MINEX

bool

True if DESC_MIN is exclusive, otherwise it is inclusive.

DESC_MAXEX

bool

True if DESC_MAX is exclusive, otherwise it is inclusive.

DESC_STEP

any

The step for the edit field arrows.

DESC_ANIMATE

int

Animation mode:

DESC_ANIMATE_OFF

OFF

DESC_ANIMATE_ON

ON

DESC_ANIMATE_MIX

MIX

DESC_ASKOBJECT

bool

True means ask object for this parameter, False meand look in container.

DESC_UNIT

int

Unit:

DESC_UNIT_FLOAT

FORMAT_FLOAT

DESC_UNIT_INT

FORMAT_INT

DESC_UNIT_PERCENT

FORMAT_PERCENT

DESC_UNIT_DEGREE

FORMAT_DEGREE

DESC_UNIT_METER

FORMAT_METER

DESC_PARENTGROUP

int

Parent ID (DescID).

DESC_CYCLE

BaseContainer

Contains the members of cycle as strings. (E.g. GetString(10041) == "-X".)

DESC_HIDE

bool

Indicates whether the property is hidden or not.

DESC_DEFAULT

any

Default numeric value.

DESC_ACCEPT

BaseContainer

Contains the accepted IDs as strings. (E.g. GetString(5155) == "Obase".)

DESC_SEPARATORLINE

bool

True if separators should have a visible line.

DESC_REFUSE

BaseContainer

Contains the refused IDs as strings. (E.g. GetString(5155) == "Obase".)

DESC_PARENTID

int

The ID of the parent element used for indentation.

DESC_CUSTOMGUI

int

The ID of the GUI for this element. Either a custom ID or one of:

CUSTOMGUI_REAL

float edit field.

CUSTOMGUI_REALSLIDER

float edit field with slider.

CUSTOMGUI_REALSLIDERONLY

float slider only.

CUSTOMGUI_VECTOR

Vector.

CUSTOMGUI_STRING

str field.

CUSTOMGUI_STRINGMULTI

Multiple line string field.

CUSTOMGUI_STATICTEXT

Static text field.

CUSTOMGUI_CYCLE

Selection list field.

CUSTOMGUI_CYCLEBUTTON

Selection field list with button functionality, e.g. the function of a button can be changed through a selection field list.

CUSTOMGUI_LONG

Long edit field.

CUSTOMGUI_LONGSLIDER

Long edit field with slider.

CUSTOMGUI_BOOL

Checkbox.

CUSTOMGUI_TIME

Time edit field.

CUSTOMGUI_COLOR

Color chooser.

CUSTOMGUI_MATRIX

Matrix edit fields.

CUSTOMGUI_BUTTON

Button.

CUSTOMGUI_POPUP

Popup field.

CUSTOMGUI_SEPARATOR

Separator.

CUSTOMGUI_SUBDESCRIPTION

Subdescription.

CUSTOMGUI_PROGRESSBAR

Progress bar.

DESC_COLUMNS

int

Number of columns for layout groups.

DESC_LAYOUTGROUP

bool

True if this is a LAYOUTGROUP.

DESC_REMOVEABLE

bool

True if this entry is removable.

DESC_GUIOPEN

bool

True if the maximized GUI is shown by default.

DESC_EDITABLE

bool

True if this entry is editable.

DESC_MINSLIDER

any

The minimum value for the slider.

DESC_MAXSLIDER

any

The maximum value for the slider.

DESC_GROUPSCALEV

bool

Allow the group height to be scaled.

DESC_SCALEH

bool

Scale element horizontally.

DESC_LAYOUTVERSION

int

Layout version.

DESC_ALIGNLEFT

bool

Align element left.

DESC_FITH

bool

Fit element.

DESC_NEWLINE

bool

Line break.

DESC_TITLEBAR

bool

Main group title bar.

DESC_CYCLEICONS

BaseContainer

int icon IDs for cycle.

DESC_CYCLESYMBOLS

BaseContainer

str identifiers for helpsymbol export.

DESC_PARENT_COLLAPSE

int

Parent collapse ID.

DESC_FORBID_INLINE_FOLDING

bool

Instruct the AM to not to allow expanding inline objects for this property.

DESC_FORBID_SCALING

bool

Prevents auto-scaling of the parameter with the scale tool (for DESC_UNIT_METER).

DESC_ANGULAR_XYZ

bool

True for XYZ as angular representation, or False for HPB.

DESC_INPORT

bool

GV in port.

DESC_OUTPORT

bool

GV out port.

DESC_STATICPORT

bool

GV static port.

DESC_NEEDCONNECTION

bool

GV needs connection.

DESC_MULTIPLE

bool

GV multiple ports allowed.

DESC_PORTONLY

bool

GV port only.

DESC_CREATEPORT

bool

GV create port.

DESC_PORTSMIN

int

GV minimum number of ports.

DESC_PORTSMAX

int

GV maximum number of ports.

DESC_NOTMOVABLE

bool

GV not movable.

DESC_EDITPORT

bool

GV editable.

DESC_ITERATOR

bool

GV iterator port.

DESC_PARENTMSG

int

Used in the Material Editor on the boolean tabs to specifiy which section to open.

DESC_MATEDNOTEXT

bool

No text in Material Editor window.

DESC_COLUMNSMATED

bool

Number of columns in left Material Editor window.

DESC_SHADERLINKFLAG

bool

Specifies that this element is a shader link. (Only if datatype == DTYPE_LINK.)

DESC_NOGUISWITCH

bool

Disables GUI switching for this description element.

DESC_TEMPDESCID

any

Private. Used internally to store the prefered description ID.

DESC_IDENT

str

Resource identifier, e.g. ID_BASEOBJECT_NAME.



Constant Description

DESCID_ROOT

Root.

ID_USERDATA

Private.

DESCID_DYNAMICSUB

Private.

Definition

class c4d.Description

Members

Description.__iter__(bc, id, groupid)

Iterate over the parameters of an object’s description.

Parameters:
  • bc (BaseContainer) – The container that holds the information for the current description parameter.
  • id (DescID) – The ID of the current description parameter.
  • groupid (DescID) – The group ID of the current description parameter.

Here is how to print the name of all the parameters of an object:

import c4d

def main():
    if op is None:
        return

    description = op.GetDescription(c4d.DESCFLAGS_DESC_0)    # Get the description of the active object
    for bc, paramid, groupid in description:                 # Iterate over the parameters of the description
        print bc[c4d.DESC_NAME]                              # Print the current parameter name

if __name__=='__main__':
    main()

Table Of Contents