Vizard 7 » Command Index » Vizard modules » vizfx » <vizfx>.addChild
7.7

<vizfx>.addChild

Load a model and apply shader effects

<vizfx>.addChild(  
filename  
effectFlags = viz.EFFECTGEN_DEFAULT  
composer = vizfx.DEFAULT_COMPOSER  
**kw  
)  
filename
Filename of model.
effectFlags = viz.EFFECTGEN_DEFAULT
A combination of the following effect generation flags:

Flag

Description

viz.EFFECTGEN_OSGMAXEXP

Generate effect from models created by the OSG 3ds Max exporter plugin.

viz.EFFECTGEN_CAL3D

Generate effects for Cal3d avatar models. This will enable hardware skinning on the avatar.

viz.EFFECTGEN_ATTR_TEXTURE

Generate effects using the current fixed function texture attribute state.

viz.EFFECTGEN_ATTR_COLOR

Generate effects using the fixed function color attribute state.

viz.EFFECTGEN_ATTR_ALL

Generate effects using all supported fixed function attributes. This flag is an alias for (viz.EFFECTGEN_ATTR_TEXTURE | viz.EFFECTGEN_ATTR_COLOR)

viz.EFFECTGEN_DEFAULT

The default flag is a combination of all the above flags.

composer = vizfx.DEFAULT_COMPOSER
Name of global composer to apply.
**kw
Additional keyword arguments to pass to <viz>.addChild.

Remarks

This command will load the specified model, automatically generate shader effects, and apply the default global composer.

Return Value

<node3d> object.

Example

# Load the model and apply shader effects
model = vizfx.addChild('model.osgb')

See also

<viz>.addChild
<vizfx>.addAvatar
<vizfx>.getComposer