Main Index : Reference :
class BaseChannel
{
public:
BaseChannel();
[BaseContainer] GetContainer();
[bool] SetContainer([BaseContainer] data);
[BaseContainer] GetShaderContainer();
[bool] SetShaderContainer([BaseContainer] data);
[bool] Message([BaseContainer] msg);
}
This is the channel base class that all material channels in CINEMA 4D are derived from.
[BaseContainer] GetContainer();
Returns a container for the channel containing settings common to all channels. The container contains the following values:
| Container ID | Type | Explanation |
CH_COLOR |
[vector] |
Color vector |
CH_BRIGHTNESS |
[float] |
Brightness |
CH_TEXTURE |
[string] |
Texture name |
CH_BLUR_OFFSET |
[float] |
Blur offset |
CH_BLUR_STRENGTH |
[float] |
Blur strength |
CH_INTERPOLATION |
[int] |
Interpolation (see dialog) |
CH_MIXMODE |
[int] |
Mix mode (see dialog) |
CH_MIXSTRENGTH |
[float] |
Mix strength |
CH_TIME_FROM |
[int] |
Movie from |
CH_TIME_TO |
[int] |
Movie to |
CH_TIME_FPS |
[int] |
Movie framerate |
CH_TIME_MODE |
[int] |
Sequence mode (see dialog) |
CH_TIME_TIMING |
[int] |
Sequence timing (see dialog) |
CH_TIME_START |
[BaseTime] |
Sequence start |
CH_TIME_END |
[BaseTime] |
Sequence end |
CH_TIME_LOOPS |
[int] |
Sequence loops |
[bool] SetContainer([BaseContainer] data);
Sets the common channel settings of the channel according to the container data. For a list of container values, please see GetContainer(). Returns TRUE if successful.
[BaseContainer] GetShaderContainer();
Returns a container with the settings of the channel's current shader. If there's just an image in the channel, the container is empty.
[bool] SetShaderContainer([BaseContainer] data);
Sets the channel's shader container to data. Returns TRUE if successful.
[bool] Message([BaseContainer] msg);
A message port for shaders.
// Sets the channel to use the foo.tif texture
var bc = channel->GetContainer();
bc->SetData(CH_TEXTURE, "foo.tif");
channel->SetContainer(bc);