3ds Max C++ API Reference
Loading...
Searching...
No Matches
Object Channels

Some of the sample code specifies these channels as PART_* as opposed to *_CHANNEL. More...

Channels

The pipeline is divided into the following channels:

const ChannelMask TOPO_CHANNEL = (ChannelMask)(1<<0)
 The topology channel - the face or polygon structures.

 
const ChannelMask GEOM_CHANNEL = (ChannelMask)(1<<1)
 The vertices of the object.
 
const ChannelMask TEXMAP_CHANNEL = (ChannelMask)(1<<2)
 The texture vertices and procedural mappings.
 
const ChannelMask MTL_CHANNEL = (ChannelMask)(1<<3)
 This is no longer used.
 
const ChannelMask SELECT_CHANNEL = (ChannelMask)(1<<4)
 The sub-object selection channel.
 
const ChannelMask SUBSEL_TYPE_CHANNEL = (ChannelMask)(1<<5)
 The current level of selection.
 
const ChannelMask DISP_ATTRIB_CHANNEL = (ChannelMask)(1<<6)
 The miscellaneous bits controlling the item's display.
 
const ChannelMask VERTCOLOR_CHANNEL = (ChannelMask)(1<<7)
 The color per vertex channel.
 
const ChannelMask GFX_DATA_CHANNEL = (ChannelMask)(1<<8)
 The used internally by 3ds Max for stripping.
 
const ChannelMask DISP_APPROX_CHANNEL = (ChannelMask)(1<<9)
 Displacement approximation.
 
const ChannelMask EXTENSION_CHANNEL = (ChannelMask)(1<<13)
 The channel used by extension channel objects.
 
const ChannelMask TM_CHANNEL = (ChannelMask)(1<<10)
 The ObjectState Transform that flows down the pipeline.
 
const ChannelMask EDGEVISIBLITY_CHANNEL = (ChannelMask)(1<<11)
 For internal use.
 
const ChannelMask DONT_RECREATE_TRISTRIP_CHANNEL = (ChannelMask)(1<<12)
 For internal use.
 
const ChannelMask GLOBMTL_CHANNEL = (ChannelMask)(1<<31)
 This is no longer used.
 
const ChannelMask OBJ_CHANNELS = (TOPO_CHANNEL|GEOM_CHANNEL|SELECT_CHANNEL|TEXMAP_CHANNEL|MTL_CHANNEL|SUBSEL_TYPE_CHANNEL|DISP_ATTRIB_CHANNEL|VERTCOLOR_CHANNEL|GFX_DATA_CHANNEL|DISP_APPROX_CHANNEL|EXTENSION_CHANNEL)
 All geometry channels.
 
const ChannelMask ALL_CHANNELS = (OBJ_CHANNELS|TM_CHANNEL|GLOBMTL_CHANNEL)
 All object, transform and global material channels.
 

Object Channel Indices

The following are the indices that may be used for the object channels.

These values are used in the methods Object::UpdateValidity(), Object::SetChannelValidity() and Object::ChannelValidity().

#define TOPO_CHAN_NUM   0
 The topology channel number.
 
#define GEOM_CHAN_NUM   1
 The geometry channel number.
 
#define TEXMAP_CHAN_NUM   2
 The texture vertices and procedural mappings channels number.
 
#define MTL_CHAN_NUM   3
 This is no longer used.
 
#define SELECT_CHAN_NUM   4
 The sub-object selection channel number.
 
#define SUBSEL_TYPE_CHAN_NUM   5
 This is the current level of selection number.
 
#define DISP_ATTRIB_CHAN_NUM   6
 The display channel number.
 
#define VERT_COLOR_CHAN_NUM   7
 The vertex colors number. This is also used for the second mapping channel.
 
#define GFX_DATA_CHAN_NUM   8
 The stripping, edge list, etc. channel number.
 
#define DISP_APPROX_CHAN_NUM   9
 The displacement approximation channel number.
 
#define EXTENSION_CHAN_NUM   10
 The extension object channel number.
 

Detailed Description

Some of the sample code specifies these channels as PART_* as opposed to *_CHANNEL.

For example, PART_GEOM|PART_TOPO instead of GEOM_CHANNEL|TOPO_CHANNEL. The proper usage is the *_CHANNEL version.

See also
The Geometry Pipeline System, Modifiers, and Class Mesh in the 3ds Max Programmer's Guide, and Object Channel Indices here.

Macro Definition Documentation

◆ TOPO_CHAN_NUM

#define TOPO_CHAN_NUM   0

The topology channel number.

◆ GEOM_CHAN_NUM

#define GEOM_CHAN_NUM   1

The geometry channel number.

◆ TEXMAP_CHAN_NUM

#define TEXMAP_CHAN_NUM   2

The texture vertices and procedural mappings channels number.

◆ MTL_CHAN_NUM

#define MTL_CHAN_NUM   3

This is no longer used.

◆ SELECT_CHAN_NUM

#define SELECT_CHAN_NUM   4

The sub-object selection channel number.

◆ SUBSEL_TYPE_CHAN_NUM

#define SUBSEL_TYPE_CHAN_NUM   5

This is the current level of selection number.

◆ DISP_ATTRIB_CHAN_NUM

#define DISP_ATTRIB_CHAN_NUM   6

The display channel number.

◆ VERT_COLOR_CHAN_NUM

#define VERT_COLOR_CHAN_NUM   7

The vertex colors number. This is also used for the second mapping channel.

◆ GFX_DATA_CHAN_NUM

#define GFX_DATA_CHAN_NUM   8

The stripping, edge list, etc. channel number.

◆ DISP_APPROX_CHAN_NUM

#define DISP_APPROX_CHAN_NUM   9

The displacement approximation channel number.

◆ EXTENSION_CHAN_NUM

#define EXTENSION_CHAN_NUM   10

The extension object channel number.

Developers tend to confuse these object channel numbers (TOPO_CHAN_NUM, GEOM_CHAN_NUM, etc.) and the channel bits (TOPO_CHANNEL, GEOM_CHANNEL, etc.). Some methods refer to the channel by number and some by bit. Developers must not confuse these two as the compiler will not catch this as an error. See Channels.

Variable Documentation

◆ TOPO_CHANNEL

const ChannelMask TOPO_CHANNEL = (ChannelMask)(1<<0)

The topology channel - the face or polygon structures.

Smoothing groups and materials are also part of this channel. Edge visibility is also part of this channels since it is an attribute of the face structure.

◆ GEOM_CHANNEL

const ChannelMask GEOM_CHANNEL = (ChannelMask)(1<<1)

The vertices of the object.

Most modifiers only alter this channel.

◆ TEXMAP_CHANNEL

const ChannelMask TEXMAP_CHANNEL = (ChannelMask)(1<<2)

The texture vertices and procedural mappings.

◆ MTL_CHANNEL

const ChannelMask MTL_CHANNEL = (ChannelMask)(1<<3)

This is no longer used.

Materials are rolled into the Face data structure and are part of the topology channel.

◆ SELECT_CHANNEL

const ChannelMask SELECT_CHANNEL = (ChannelMask)(1<<4)

The sub-object selection channel.

An object's selection flows down the pipeline. What the selection is actually comprised of is up to the specific object type. For example, TriObjects have bits for face, edge and vertex selection. This channel is the actual BitArray used, like selLevel of the class Mesh.

◆ SUBSEL_TYPE_CHANNEL

const ChannelMask SUBSEL_TYPE_CHANNEL = (ChannelMask)(1<<5)

The current level of selection.

Every object that flows down the pipeline is at a certain level that corresponds to the Sub-Object drop down in the 3ds Max user interface. This channel indicates which level the object is at. This is also specific to the object type. There are 32 bits to represent the level of selection. When all the bits are 0, the object is at object level selection.

◆ DISP_ATTRIB_CHANNEL

const ChannelMask DISP_ATTRIB_CHANNEL = (ChannelMask)(1<<6)

The miscellaneous bits controlling the item's display.

These bits are specific to the type of object. For the Mesh object these are the surface normal scale, display of surface normals, edge visibility and display flags.

◆ VERTCOLOR_CHANNEL

const ChannelMask VERTCOLOR_CHANNEL = (ChannelMask)(1<<7)

The color per vertex channel.

This is also used for the second texture mapping channel.

◆ GFX_DATA_CHANNEL

const ChannelMask GFX_DATA_CHANNEL = (ChannelMask)(1<<8)

The used internally by 3ds Max for stripping.

Plug-In developers don't need to specify this channel as being changed or used in their plug-ins.

◆ DISP_APPROX_CHANNEL

const ChannelMask DISP_APPROX_CHANNEL = (ChannelMask)(1<<9)

Displacement approximation.

◆ EXTENSION_CHANNEL

const ChannelMask EXTENSION_CHANNEL = (ChannelMask)(1<<13)

The channel used by extension channel objects.

◆ TM_CHANNEL

const ChannelMask TM_CHANNEL = (ChannelMask)(1<<10)

The ObjectState Transform that flows down the pipeline.

This Transform may be modified by modifiers.

◆ EDGEVISIBLITY_CHANNEL

const ChannelMask EDGEVISIBLITY_CHANNEL = (ChannelMask)(1<<11)

For internal use.

Edge visiblity channel used internally to create an edit mesh edge vis cache

◆ DONT_RECREATE_TRISTRIP_CHANNEL

const ChannelMask DONT_RECREATE_TRISTRIP_CHANNEL = (ChannelMask)(1<<12)

For internal use.

A channel used to determine whether we should use tri strips or not

◆ GLOBMTL_CHANNEL

const ChannelMask GLOBMTL_CHANNEL = (ChannelMask)(1<<31)

This is no longer used.

Material applied to object as whole. Materials are rolled into the Face data structure and are part of the topology channel.

◆ OBJ_CHANNELS

◆ ALL_CHANNELS

All object, transform and global material channels.