Indicating Required Channels
 
 
 

A modifier must indicate to the system which channels of the pipeline it requires in order to perform its modification. To do this the developer must override the method Modifer::ChannelsUsed(). This specifies the channels that a modifier needs in order to apply its deformation. This should at least contain the channels indicated by the Modifer::ChannelsChanged() method, but may be more. For example, a modifier that applies a UV mapping may need the geometry channel but may only modify the texture map channel.

A default implementation provided by SimpleMod::ChannelsUsed() is:

return PART_GEOM|PART_TOPO|SELECT_CHANNEL|SUBSEL_TYPE_CHANNEL;

This means it needs the geometry channel (the vertices) and the topology channel (the face and polygon structures), and the sub-selection channel.

If a modifier doesn't specify that it needs a given channel then that channel may not be valid in the object state that is passed into that modifier's ModifyObject() method.

See Also