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:

enum  ChannelMask : ULONG {
  NO_CHANNEL = 0UL , TOPO_CHANNEL = 1UL << 0 , GEOM_CHANNEL = 1UL << 1 , TEXMAP_CHANNEL = 1UL << 2 ,
  MTL_CHANNEL = 1UL << 3 , SELECT_CHANNEL = 1UL << 4 , SUBSEL_TYPE_CHANNEL = 1UL << 5 , DISP_ATTRIB_CHANNEL = 1UL << 6 ,
  VERTCOLOR_CHANNEL = 1UL << 7 , GFX_DATA_CHANNEL = 1UL << 8 , DISP_APPROX_CHANNEL = 1UL << 9 , EXTENSION_CHANNEL = 1UL << 13 ,
  TM_CHANNEL = 1UL << 10 , EDGEVISIBLITY_CHANNEL = 1UL << 11 , DONT_RECREATE_TRISTRIP_CHANNEL = 1UL << 12 , GLOBMTL_CHANNEL = 1UL << 31 ,
  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_CHANNELS = (OBJ_CHANNELS|TM_CHANNEL|GLOBMTL_CHANNEL) , OBJECT_LOCKED_CHANNEL = 1UL << 27
}

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().

enum  ChannelIndex : int {
  TOPO_CHAN_NUM = 0 , GEOM_CHAN_NUM = 1 , TEXMAP_CHAN_NUM = 2 , MTL_CHAN_NUM = 3 ,
  SELECT_CHAN_NUM = 4 , SUBSEL_TYPE_CHAN_NUM = 5 , DISP_ATTRIB_CHAN_NUM = 6 , VERT_COLOR_CHAN_NUM = 7 ,
  GFX_DATA_CHAN_NUM = 8 , DISP_APPROX_CHAN_NUM = 9 , EXTENSION_CHAN_NUM = 10
}

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.

Enumeration Type Documentation

◆ ChannelMask

enum ChannelMask : ULONG
Enumerator
NO_CHANNEL 

No channels.

TOPO_CHANNEL 

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 

The vertices of the object.

Most modifiers only alter this channel.

TEXMAP_CHANNEL 

The texture vertices and procedural mappings.

MTL_CHANNEL 

This is no longer used.

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

SELECT_CHANNEL 

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 

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 

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 

The color per vertex channel.

This is also used for the second texture mapping channel.

GFX_DATA_CHANNEL 

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 

Displacement approximation.

EXTENSION_CHANNEL 

The channel used by extension channel objects.

TM_CHANNEL 

The ObjectState Transform that flows down the pipeline.

This Transform may be modified by modifiers.

EDGEVISIBLITY_CHANNEL 

For internal use.

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

DONT_RECREATE_TRISTRIP_CHANNEL 

For internal use.

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

GLOBMTL_CHANNEL 

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 geometry channels.

ALL_CHANNELS 

All object, transform and global material channels.

OBJECT_LOCKED_CHANNEL 

For internal use.

Object is locked

39{
42 NO_CHANNEL = 0UL,
44
46 TOPO_CHANNEL = 1UL << 0,
48
49 GEOM_CHANNEL = 1UL << 1,
51 TEXMAP_CHANNEL = 1UL << 2,
53
54 MTL_CHANNEL = 1UL << 3,
56
60 SELECT_CHANNEL = 1UL << 4,
62
67 SUBSEL_TYPE_CHANNEL = 1UL << 5,
69
71 DISP_ATTRIB_CHANNEL = 1UL << 6,
73
74 VERTCOLOR_CHANNEL = 1UL << 7,
76
77 GFX_DATA_CHANNEL = 1UL << 8, // stripping, edge list, etc.
79 DISP_APPROX_CHANNEL = 1UL << 9,
81 EXTENSION_CHANNEL = 1UL << 13,
83
84 TM_CHANNEL = 1UL << 10,
85
87
88 EDGEVISIBLITY_CHANNEL = 1UL << 11,
89 // watje
91
93
95
97 GLOBMTL_CHANNEL = 1UL << 31,
98
103
105
106 OBJECT_LOCKED_CHANNEL = 1UL << 27
107};
@ VERTCOLOR_CHANNEL
The color per vertex channel.
Definition channels.h:74
@ DONT_RECREATE_TRISTRIP_CHANNEL
For internal use.
Definition channels.h:92
@ EXTENSION_CHANNEL
The channel used by extension channel objects.
Definition channels.h:81
@ OBJECT_LOCKED_CHANNEL
For internal use.
Definition channels.h:106
@ DISP_ATTRIB_CHANNEL
The miscellaneous bits controlling the item's display.
Definition channels.h:71
@ ALL_CHANNELS
All object, transform and global material channels.
Definition channels.h:102
@ SUBSEL_TYPE_CHANNEL
The current level of selection.
Definition channels.h:67
@ EDGEVISIBLITY_CHANNEL
For internal use.
Definition channels.h:88
@ GEOM_CHANNEL
The vertices of the object.
Definition channels.h:49
@ OBJ_CHANNELS
All geometry channels.
Definition channels.h:100
@ TOPO_CHANNEL
The topology channel - the face or polygon structures.
Definition channels.h:46
@ MTL_CHANNEL
This is no longer used.
Definition channels.h:54
@ DISP_APPROX_CHANNEL
Displacement approximation.
Definition channels.h:79
@ SELECT_CHANNEL
The sub-object selection channel.
Definition channels.h:60
@ TM_CHANNEL
The ObjectState Transform that flows down the pipeline.
Definition channels.h:84
@ GLOBMTL_CHANNEL
This is no longer used.
Definition channels.h:97
@ GFX_DATA_CHANNEL
The used internally by 3ds Max for stripping.
Definition channels.h:77
@ TEXMAP_CHANNEL
The texture vertices and procedural mappings.
Definition channels.h:51
@ NO_CHANNEL
No channels.
Definition channels.h:42

◆ ChannelIndex

enum ChannelIndex : int
Enumerator
TOPO_CHAN_NUM 

The topology channel number.

GEOM_CHAN_NUM 

The geometry channel number.

TEXMAP_CHAN_NUM 

The texture vertices and procedural mappings channels number.

MTL_CHAN_NUM 

This is no longer used.

SELECT_CHAN_NUM 

The sub-object selection channel number.

SUBSEL_TYPE_CHAN_NUM 

This is the current level of selection number.

DISP_ATTRIB_CHAN_NUM 

The display channel number.

VERT_COLOR_CHAN_NUM 

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

GFX_DATA_CHAN_NUM 

The stripping, edge list, etc. channel number.

DISP_APPROX_CHAN_NUM 

The displacement approximation channel number.

EXTENSION_CHAN_NUM 

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.

121{
124 TOPO_CHAN_NUM = 0,
126 GEOM_CHAN_NUM = 1,
128 TEXMAP_CHAN_NUM = 2,
130 MTL_CHAN_NUM = 3,
132 SELECT_CHAN_NUM = 4,
144
150};
@ DISP_ATTRIB_CHAN_NUM
The display channel number.
Definition channels.h:136
@ SELECT_CHAN_NUM
The sub-object selection channel number.
Definition channels.h:132
@ TOPO_CHAN_NUM
The topology channel number.
Definition channels.h:124
@ DISP_APPROX_CHAN_NUM
The displacement approximation channel number.
Definition channels.h:142
@ GEOM_CHAN_NUM
The geometry channel number.
Definition channels.h:126
@ MTL_CHAN_NUM
This is no longer used.
Definition channels.h:130
@ VERT_COLOR_CHAN_NUM
The vertex colors number. This is also used for the second mapping channel.
Definition channels.h:138
@ SUBSEL_TYPE_CHAN_NUM
This is the current level of selection number.
Definition channels.h:134
@ TEXMAP_CHAN_NUM
The texture vertices and procedural mappings channels number.
Definition channels.h:128
@ GFX_DATA_CHAN_NUM
The stripping, edge list, etc. channel number.
Definition channels.h:140
@ EXTENSION_CHAN_NUM
The extension object channel number.
Definition channels.h:149