This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com

c4d.MatAssignData – a MatAssignData class

This class is an Material assignment data type. This type is called by value:

#mat is a BaseMaterial instance and contains a MatAssignData element at the given position [ASSIGN_DATA_ID]
#in this case you have to send the object back to apply the change.
mdata = op[ASSIGN_DATA_ID]
mdata.InsertObject(cube, 0)
mat[ASSIGN_DATA_ID] = mdata
class c4d.MatAssignData

Methods

MatAssignData.__init__([v])
Parameter:v (MatAssignData) – Copy constructor.
Return type:MatAssignData
Returns:The new matassign data.
MatAssignData.DeleteObject(index)

Deletes an object in the list.

Parameter:index (int) – The index
Return type:int
Returns:True if the object was deleted, otherwise False
MatAssignData.InsertObject(plist, flags)

Inserts a list of objects into the list.

Parameters:
  • plist (List of BaseList2D) – A list of objects to insert.
  • flags (int) – The Flags - set for all objects in the given list plist.
Return type:

bool

Returns:

True if successful, otherwise False

MatAssignData.GetObject(index, doc)

Gets an object by index.

Parameters:
  • index (int) – The index
  • doc (BaseDocument) – The document of the object.
Return type:

BaseList2D

Returns:

The object or None.

MatAssignData.GetObjectCount()

Returns the count of objects in the list.

Return type:int
Returns:The count

Table Of Contents

This Page