c4d.BaseMaterial
¶
c4d.
BaseMaterial
¶
BaseMaterial.Compare()
BaseMaterial.GetPreview()
BaseMaterial.GetAverageColor()
BaseMaterial.Update()
BaseMaterial.GetRenderInfo()
c4d.BaseList2D
BaseMaterial.
__init__
(
type
)
¶
Initialize a new
BaseMaterial
in memory.
Parameters: | type ( int ) – The material type : Material Types . |
---|---|
Return type: | c4d.BaseMaterial |
Returns: | The new material. |
BaseMaterial.
Compare
(
snd
)
¶
Check if the materials are identical.
Note
Only the name of the compared materials can be different.
Parameters: | snd ( c4d.BaseMaterial ) – The material to compare with. |
---|---|
Return type: | bool |
Returns: | True if the materials contents are the same, otherwise False . |
BaseMaterial.
GetPreview
(
[
flags=0
]
)
¶
Retrieves the preview picture of the material.
Parameters: | flags ( int ) – Currently not used. |
---|---|
Return type: | c4d.bitmaps.BaseBitmap |
Returns: | The preview picture or None if it has not been calculated. |
BaseMaterial.
GetAverageColor
(
[
channel=NOTOK
]
)
¶
Returns an average color for the material, based on the material preview.
Parameters: |
channel
(
int
) –
An optional specific channel to get the average for.
|
||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | c4d.Vector | ||||||||||||||||||||||||||||||
Returns: | Average color. |
BaseMaterial.
Update
(
preview
,
rttm
)
¶
Recalculates the material’s thumbnail and updates internal values.
Note
Recalculating the thumbnail/RTTM image is time intensive. It only needs to be done if you want to let the user view the change. The calculations are done asynchronously.
Parameters: |
|
---|
BaseMaterial.
GetRenderInfo
(
)
¶
Retrieves information about what the material requires from the raytracer and what it will return.
Return type: | int | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: |
The return values are:
|