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

<composer>.getName

Return the name of the composer

<composer>.getName()  

Remarks

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

Return Value

Composer name

Example

code = """
Composer "MyComposer" {

    Vertex {
        BEGIN
        void main()
        {
            vec4 eyeVertex = gl_ModelViewMatrix * gl_Vertex;
            gl_Position = gl_ProjectionMatrix * eyeVertex;
        }
        END
    }

    Fragment {
        BEGIN
        void main()
        {
            vec4 color = vec4(0.0,0.0,0.0,1.0);

            <ComputeColor>

            gl_FragColor = color;
        }
        END
    }
}
"""
composer = viz.addEffectComposer(code)

# Will print out 'MyComposer'
print(composer.getName())