Vizard 7 » Command Index » Vizard objects » node3d » <node3d>.clearEffectType
7.7

<node3d>.clearEffectType

Clear an effect type from the node

<node3d>.clearEffectType(  
typeName  
node = ''  
op = viz.OP_DEFAULT  
)  
typeName
Effect type name
node = ''
The subnode to clear the effect from
op = viz.OP_DEFAULT
Can be viz.OP_DEFAULT to use the nodes default op mode or a combination of the following values:

Op modes

viz.OP_TRAVERSE

When performing an operation on a node, traverse the entire subgraph and process all subnodes as well. This is the default value.

viz.OP_OVERRIDE

When applying attributes, have them override attributes of subnodes.

viz.OP_ROOT

When performing an operation on the node, start at the root transform of the node, instead of the model. Processing the root will include all child Vizard nodes.

Remarks

This command will clear all effects with the specified type name from the node. The node is still susceptible to inheriting the effect type from a parent node.

Return Value

None

Example

code = """
Effect "MyEffect" {

    Type SetDiffuse

    Shader {
        BEGIN Material
        m.diffuse = vec3(1.0,0.0,0.0);
        END
    }
}
"""
effect = viz.addEffect(code)

model.apply(effect)

.
.
.

# The previously applied effect will no longer affect the model
model.clearEffectType('SetDiffuse')

See also

<node3d>.clearAttribute
<node3d>.clearUniform
<effect>.unapply
<effect>.getTypeName