Interface: INodeBakeProperties

This represents the Node Interface to the node’s Texture Baking properties.

Properties:

<Node>.bakeEnabled : boolean : Read|Write      

Enables/Disables Texture Baking for the node.

<Node>.bakeChannel : integer : Read|Write   

Gets/Sets the Texure Baking channel of the node.

<Node>.nDilations : integer : Read|Write 

Gets/Sets the nDilation value of the node.

<Node>.flags: integer : Read|Write 

Gets/Sets the Texture Baking flags.

<Node>.surfaceArea : float : Read|Write 

Gets/Sets the Texture Baking Surface Area.

<Node>.areaScale : float : Read|Write 

Gets/Sets the Texture Baking Area Scaling.

<Node>.activeOriginX : float : Read|Write 

Gets/Sets the Texture Baking Active Origin X coordinate.

<Node>.activeOriginY : float : Read|Write 

Gets/Sets the Texture Baking Active Origin Y coordinate.

<Node>.activeWidth : float : Read|Write 

Gets/Sets the Texture Baking Active Width.

<Node>.activeHeight : float : Read|Write 

Gets/Sets the Texture Baking Active Height.

Methods:

<boolean><Node>.addBakeElement <maxObject>element 

Adds a Bake Element.

<boolean><Node>.removeBakeElement <maxObject>element 

Removes a Bake Element.

<boolean><Node>.removeBakeElementByIndex <integer>elementIndex 

Removes the indexed Bake Element.

<boolean><Node>.removeBakeElementByName <string>elementName 

Removes the Bake Element specified by the name string.

<void><Node>.removeAllBakeElements() 

Removes all BakeElements.

<integer><Node>.numBakeElements() 

Returns the number of Bake Elements.

<maxObject><Node>.getBakeElement <integer>index 

Returns the indexed Bake Element.

<integer><Node>.findByName <string>elementName 

Returns the index of the named Bake Element .

<integer><Node>.renderWidth() 

Returns the rendering width in pixels.

<integer><Node>.renderHeight() 

Returns the rendering height in pixels.

<boolean><Node>.effectiveEnable() 

Returns the enabled state.

<integer><Node>.nParams() 

Returns the number of available parameters in the Bake Element.

The following methods provide indexed access to Bake Element parameters. Using these methods, a script can manipulate the state of specific Bake Element properties without knowledge of the classes of the separate Bake Elements.

<integer><Node>.numElementParams <maxObject>element 

Returns the number of available parameters in the Bake Element.

<string><Node>.paramName <maxObject>element<integer>paramIndex 

Returns the name of the indexed parameter in the Bake Element.

<integer><Node>.paramType <maxObject>element<integer>paramIndex 

Returns the type of the indexed parameter in the Bake Element.

<value><Node>.paramValue <maxObject>element<integer>paramIndex 

Returns the value of the indexed parameter in the Bake Element.

<void><Node>.setParamValue <maxObject>element <integer>paramIndex <value>paramValue 

Sets the value of the indexed parameter in the Bake Element to the supplied value.

<value><Node>.paramValueMin <maxObject>element <index>paramIndex 

Returns the min. value of the indexed parameter in the Bake Element. Available in 3ds Max 8 and higher.

<value><Node>.paramValueMax <maxObject>element <index>paramIndex 

Returns the max. value of the indexed parameter in the Bake Element. Available in 3ds Max 8 and higher.

<integer><Node>.findParam <maxObject>element <string>paramName 

Returns the index of the named parameter in the Bake Element.

EXAMPLE

   -- create a new BlendMap Bake Element
   be = BlendMap()
   --> ReferenceTarget:BlendMap
   -- create a new Box object and get its INodeBakeProperties interface
   bx = Box()
   bi = bx.INodeBakeProperties
   --> <MixinInterface:INodeBakeProperties>
   -- add the new BakeElement to the node
   bi.addBakeElement be
   --> true
   -- get the number of available parameters
   bi.numElementParams be
   --> 8
   -- output the name, type and value of all 8 parameters
   for i = 1 to 8 do format "% % %\n" (bi.paramName be i) (bi.paramType be i) (bi.paramValue be i)
   --> Lighting 1 1
   --> Shadows 0 1
   --> Diffuse 0 1
   --> Ambient 0 1
   --> Specular 0 1
   --> Self-Illum 0 1
   --> Reflection 0 1
   --> Refraction 0 1
   --> OK
   -- check the value of paramter 1 (Lighting) - 1 means True
   bi.paramValue be 1
   --> 1
   -- check the actual Lighting property &endash; it is really True
   be.Lighting
   --> true
   -- to change the Lighting to False, set the parameter value to 0
   bi.setParamValue be 1 0
   --> OK
   -- check to see the new value
   bi.paramValue be 1
   --> 0
   -- check to see that the property of the BakeElement has changed...
   be.Lighting
   --> false