Interface: INodeShadingProperties

 

   

Viewport Shading - Quick Navigation

The INodeShadingProperties Node Interface exposes the node-related viewport shading properties to MAXScript.

Only nodes whose base object is of Light superclass will effectively use these properties, but the property can be set in any node.

Available in 3ds Max 2008 and higher.

   

Interface: INodeShadingProperties 

Properties:

INodeShadingProperties.ViewportIllumination : bool : Read|Write   

When set to true (default), enables Viewport Illumination for the node, assuming the base object is a Light and the Viewport Shading mode is set to Best (SM3.0) - seeInterface: IViewportShadingMgr on how to enable the advanced shading modes. The Best mode depends on the graphics hardware supporting the SM3.0 shader model.

On hardware that supports only SM2.0, the Good mode performs old-style vertex lighting only and does not support per-pixel lighting.

EXAMPLE

IViewportShadingMgr.ShadingLimits= #Best --enable shadows
$Spot01.on = true --make sure the light is on
$Spot01.ViewportIllumination = true --display illumination

When set to false , Viewport Illumination is turned off for the node.

EXAMPLE

$Spot01.ViewportIllumination = false -- display illumination

   

INodeShadingProperties.ViewportShadowCasting : bool : Read|Write 

When set to true , enables Viewport Shadow Casting for the node, provided the base object is a Light and Shadow Casting is turned on in the light's base object using <light> .baseobject.castShadows = true. (Remember, .castShadows is also a node property and requires explicit access in the baseobject to affect the shadow casting of the light).

To see the shadows in the viewport, the Viewport Shading has to be set to Good (SM2.0) or Best (SM3.0) - see Interface: IViewportShadingMgr on how to enable the advanced shading modes.

EXAMPLE

IViewportShadingMgr.ShadingLimits = #Best --enable shadows
$Spot01.baseobject.castshadows = true --enable shadows in Spot01
$Spot01.ViewportShadowCasting = true --display shadows ofSpot01

When set to false ,Viewport Shadow Casting is turned off for the node.

Since 3ds Max 2010, this property defaults to true, thus automatically enabling viewport shadow casting for any light that has its base object shadows turned on. In 3ds Max 2008 and 2009, the property was set to false by default.

EXAMPLE

$Spot01.ViewportShadowCasting = false

   

INodeShadingProperties.LockedViewportIllumination : bool : Read|Write 

When set to true , locks the Viewport Illumination for the node

When set to false (default), Viewport Illumination is unlocked for this node.

When the Interface: IViewportShadingMgr .AutoDisplaySelLights property is set to true , lights that are not selected will not illuminate the scene.

By setting the .LockedViewportIllumination property to true , a light node can be locked to keep on illuminating the scene even after it has been deselected.

See Interface: IViewportShadingMgr for methods to quickly lock and unlock multiple lights. The 3ds Max QuadMenus provide menu items to call these methods on the selected lights:

See Also