c4d.DescID

An ID class for description elements. Contains a stack of DescLevel objects.

The description ID is used to exactly identify a parameter value.

Members

DescID.__init__([id1[, id2, id3]])

Create a DescID instance up to three levels:

dId = c4d.DescID()
dId = c4d.DescID(dId) #copy constructor
dId = c4d.DescID(10) #first level with given ID
dId = c4d.DescID(DescLevel(10), DescLevel(20), DescLevel(30)) #set three levels
Parameters:
DescID.__str__()

Returns the DescID as string. Called if str() is wrapped around an instance of DescID. (see __str__).:

dId = c4d.DescID(c4d.DescLevel(30))
print dId                # output '(30, 0, 0)'
Return type:str
Returns:The DescID as string.
DescID.__lshift__(self, other)

Returns the result of popping shift levels from the bottom of the stack:

dId = c4d.DescID(c4d.DescLevel(30), c4d.DescLevel(40), c4d.DescLevel(50))
dId<<2
Parameters:other (int) – Number of levels to pop.
Raises IndexError:
 If other is out of range : 0<=other<GetDepth().
Return type:DescID
Returns:Result.
DescID.__getitem__(self, key)

Returns the level at position key in the stack:

dId = c4d.DescID(c4d.DescLevel(30), c4d.DescLevel(40), c4d.DescLevel(50))
diD[2]
Parameters:key (int) – The position.
Raises IndexError:
 If other is out of range : 0<=key<GetDepth().
Return type:DescLevel
Returns:The level at the specified position.
DescID.__eq__(self, other)

Checks if all levels are equal.

DescID.__ne__(self, other)

The reverse of __eq__.

DescID.SetId(subid)

Set the highest level to subid.

Parameters:subid (DescLevel) – New toplevel.
DescID.PushId(subid)

Push a new level onto the stack.

Parameters:subid (DescLevel) – Level to push.
DescID.PopId()

Pops the highest level from the stack.

DescID.GetDepth()

Return the depth.

Return type:int
Returns:The depth.
DescID.Write(hf)

Writes the description to a file.

Parameters:hf (HyperFile) – The hyperfile to write to.
DescID.Read(hf)

Reads the description from a file.

Parameters:hf (HyperFile) – The hyperfile to read from.
Return type:bool
Returns:True if successful, otherwise False.

Table Of Contents