Interface: INodeBakeProperties

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

Properties:

.bakeEnabled : boolean : Read|Write

Enables/Disables Texture Baking for the node.

.bakeChannel : integer : Read|Write

Gets/Sets the Texure Baking channel of the node.

.nDilations : integer : Read|Write

Gets/Sets the nDilation value of the node.

.flags : integer : Read|Write

Gets/Sets the Texture Baking flags.

.surfaceArea : float : Read|Write

Gets/Sets the Texture Baking Surface Area.

.areaScale : float : Read|Write

Gets/Sets the Texture Baking Area Scaling.

.activeOriginX : float : Read|Write

Gets/Sets the Texture Baking Active Origin X coordinate.

.activeOriginY : float : Read|Write

Gets/Sets the Texture Baking Active Origin Y coordinate.

.activeWidth : float : Read|Write

Gets/Sets the Texture Baking Active Width.

.activeHeight : float : Read|Write

Gets/Sets the Texture Baking Active Height.

Methods:

<boolean>addBakeElement <maxObject>element

Adds a Bake Element.

<boolean>removeBakeElement <maxObject>element

Removes a Bake Element.

<boolean>removeBakeElementByIndex <integer>elementIndex

Removes the indexed Bake Element.

<boolean>removeBakeElementByName <string>elementName

Removes the Bake Element specified by the name string.

<void>removeAllBakeElements()

Removes all BakeElements.

<integer>numBakeElements()

Returns the number of Bake Elements.

<maxObject>getBakeElement <integer>index

Returns the indexed Bake Element.

<integer>findByName <string>elementName

Returns the index of the named Bake Element .

<integer>renderWidth()

Returns the rendering width in pixels.

<integer>renderHeight()

Returns the rendering height in pixels.

<boolean>effectiveEnable()

Returns the enabled state.

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>numElementParams <maxObject>element

Returns the number of available parameters in the Bake Element.

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

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

<integer>paramType <maxObject>element <integer>paramIndex

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

<fpvalue by value>paramValue <maxObject>element <integer>paramIndex

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

<void>setParamValue <maxObject>element <integer>paramIndex <fpvalue by value>paramValue

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

<fpvalue by value>paramValueMin <maxObject>element <index>paramIndex

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

<fpvalue by value>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>findParam <maxObject>element <string>paramName

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

 

For 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 – 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

 

See also

Node Interfaces

AlphaMap : BakeElement

BlendMap : BakeElement

CompleteMap : BakeElement

diffuseMap : BakeElement

LightingMap: BakeElement

NormalsMap : BakeElement

ShadowsMap : BakeElement

specularMap : BakeElement