Data_Channel : Modifier

Data_Channel - superclass: modifier; super-superclass:MAXWrapper - classID: #(e11,0) 

Value > MAXWrapper > Modifier > Data_Channel

 

   

Modifier Classes - Quick Navigation

The Data Channel Modifier is a tool for creating effects and automating modelling operations. It pipes object channel data through a series of operators to achieve effects on the mesh. Scene objects contain various subcategories of data that define attributes such as geometry, vertex color settings, world coordinates, selections and texture mapping. This data is stored in separate channels and The Data Channel Modifier can process and modify the data in them. Available in 3ds Max 2017.1 Update and higher

Data Channels are manipulated with components called Operands. Operands are contained in a stack in the Data Channel Modifier, and data is processed as it flows through the operand stack. Operands are held in the operators array, and the order of operand processing (and order in the UI) is determined by the operator_order array.

For operator classes, see Data Channel Operator Classes.

Constructor

Data_Channel ... 

Properties

<Data_Channel>.operators array  

An array of ReferenceTarget objects referring to the operands in the operator stack. Note that the actual order of the operand in the stack is held in the operator_order array.

<Data_Channel>.operator_enabled : boolean array

An array of Booleans corresponding to the operands in the operators array, indicating whether the corresponding operand is enabled. Note that the actual order of processing (and order in the Data Channel Modifier UI) is not determined by the order of operators in this array, but rather by the operator_order array.

<Data_Channel>.operator_ops : int array

An array of integers indicating how the operator at the corresponding index in the operators array is applied to the stack data, where:

<Data_Channel>.operator_order : int array

An array of integers indicating the order of the operator at the corresponding index in the operands array.

<Data_Channel>.display (Enable_Display) : boolean

Indicates whether the results of the modifier are displayed in the viewport. This property corresponds to the state of the Enable Display push button in the Data Channel Modifier UI.

<Data_Channel>.operator_frozen (Frozen) : boolean array

An array of Booleans indicating whether the corresponding operand in the operators array is frozen. This property corresponds to the Freeze right-click command in the Data Channel Modifier UI.

Viewport Display Settings

<Data_Channel>.floatDisplay (Float_Display) : integer

Gets or sets how the data is displayed when the data in the stack is floating point array. Possible values are:

<Data_Channel>.point3Display (Point3_Display) : integer

Gets or sets how the data is displayed when the data in the stack is point3 point array.

<Data_Channel>.tickSize (Tick_Size) : integer

Gets or sets the size of the tick if a tick display is chosen, where:

<Data_Channel>.normalizeDisplay (Normalize_Display) : Boolean

Gets or sets whether the data is normalized before converting it to color. This can be useful when the data is not color-based, such as velocity.

This property corresponds to the NormalizeDisplay checkbox in the Display section of the Data Channel UI.

<Data_Channel>.showNumericData (Numeric_Display) : Boolean

Enables or disables the numeric display in the viewport

This property corresponds to the Show Numeric checkbox in the Display section of the Data Channel UI.

<Data_Channel>.minColor (Min_Color) : RGB color
<Data_Channel>.midColor (Mid_Color) : RGB color
<Data_Channel>.maxColor (Max_Color) : RGB color

Gets or sets the colors used to form the gradient when the data is a float array, similar to the soft selection gradient colors

<Data_Channel>.numeric_max : integer default : 1000

Gets or sets the maximum number of numerics to draw in the viewport; limiting the number can help performance since they are slow to draw and can clutter the display

This property is not exposed in the Data Channel UI.

<Data_Channel>.numeric_drawdist : integer default : 100

This is a bounding rect centered on the view and used to cull numerics at the edge of the view.

Associated Interface

Interface: DataChannelModifier

Properties:

None

Methods:

<integer> <Data_Channel>.NumberOperators()

Returns the total number of operators available. Note: this is a static number, and can be used to iterate all possible operators.

Example
numOps = $.modifiers[#Data_Channel].NumberOperators()
for i = 1 to numOps+1 do
(
	name = " "
	info = " "
	tt = " "
	idA = 0L
	idB = 0L
	$.modifiers[#Data_Channel].OperatorName i &name
	$.modifiers[#Data_Channel].OperatorTooltip i &tt
	$.modifiers[#Data_Channel].OperatorInfo i &info
	$.modifiers[#Data_Channel].OperatorID i &idA &idB
	print name
	print tt
	print info
	print idA 
	print idB
)

<void> <Data_Channel>.OperatorName <index>index <&TSTR>name
name is Out parameter
	 
	 

Saves the name of the operator at the specified index in the name parameter.

<void> <Data_Channel>.OperatorInfo <index>index <&TSTR>info
 info is Out parameter
	 
	 

Saves the information string for the operator at the specified index in the info parameter.

<void> <Data_Channel>.OperatorTooltip <index>index <&TSTR>toolTip
 toolTip is Out parameter
	 

Saves the tooltip string for the operator at the specified index in the toolTip parameter.

<void> <Data_Channel>.OperatorID <index>index <&INT64>idA <&INT64>idb
idA is Out parameter
idb is Out parameter	 
	 

Saves the internal class ID for the operator at the specified index into the idA (PartA) and idB (PartB) parameters.

<void> <Data_Channel>.AddOperator <INT64>idA <INT64>idb <integer>whereat
	 

Adds the operator specified by a two-part class ID (PartA and PartB) into the DataChannelModfier’s operators array at the specified index. Specify whereat as -1 to insert at the end of the array. The Class ID is passed as a long integer value, not a hexadecimal. You can obtain the class ID in a couple of ways; one way is to use the OperatorID() method to get the class ID in integer format. You can also use the showClass() method, and convert the result from hex to decimal. For example: showClass "Operator_DeltaMush".

Example:

$.modifiers[#Data_Channel].AddOperator 236108612L 0L -1
$.modifiers[#Data_Channel].AddOperator 283192250L 0L -1 
$.modifiers[#Data_Channel].AddOperator 2882382387L 0L -1 
$.modifiers[#Data_Channel].AddOperator 99L 0L -1

ct = $.modifiers[#Data_Channel].StackCount()

<integer> <Data_Channel>.StackCount() 

Returns the number of operators currently in the modifier’s stack.

<void> <Data_Channel>.StackOperatorName <index>index <&TSTR>name
name is Out parameter
	 

Saves the name of the operator at the specified index into the name parameter.

<void> <Data_Channel>.SelectStackOperator <index>index
	 

Selects the operator at the specified index in the modifier’s stack.

<void> <Data_Channel>.DeleteStackOperator <index>index
	 

Deletes the operator at the specified index in the modifier’s stack.

<void> <Data_Channel>.ReorderStackOperator <index by value array>indexList
	 

Re-orders the operator stack according to the indexList array. For example, in an operand stack of 4 items, specifying indexList #(3,2,1,0) will reverse the order of the operands.

Note: you need to be careful with this methods, since it does not bound check and you cannot change the number of operators.

<void> <Data_Channel>.SavePreset <TSTR>name <TSTR>toolTip
	 

Saves the current operand stack as a preset, with the specified name and toolTip. You do not need to specify a path. Data Channel presets are saved under the 3ds Max install directory in en-US\plugfcg\DataChannelPresets.

<void> <Data_Channel>.LoadPreset <TSTR>name
	 

Loads the specified preset by name. For example:

$.modifiers[#Data_Channel].LoadPreset "Dirt Map" 
	 

<void> <Data_Channel>.DeletePreset <TSTR>name
	 

Deletes the preset specified by name.

<integer> <Data_Channel>.PresetCount() 

Returns the number of available presets.

<void> PresetName <index>index <&TSTR>name
name is Out parameter 

	 

Saves the name of the preset at the specified index into the name parameter.

<void> PerfTrackingStart()
<void> PerfTrackingEnd()
<void> PerfTrackingReport() 

These functions expose performance tracking functionality. PerfTrackingStart() starts recording the time data, PerfTrackingEnd() stops it. All the timestamps are stored internally. PerfTrackingReport() writes the timing data out to the listener window.

Actions:

None