Vizard 8 » Command Index » Vizard objects » effect » <effect>.getName
8.1

<effect>.getName

Return the name of the effect

<effect>.getName()  

Remarks

This command will return the name of the effect specified within the definition. If the effect definition does not specify a name, it will default to an empty string.

Return Value

Effect name

Example

code = """
Effect "MyEffect" {

    Type SetColor

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

# Will print out 'MyEffect'
print(effect.getName())

See also

<effect>.getTypeName