Vizard 7 » Command Index » Vizard objects » effect » <effect>.getProperty
7.6

<effect>.getProperty

Get the value of an effect property

<effect>.getProperty(  
name  
)  
name
Name of property

Remarks

This command will return the value of the property with the specified name.

Return Value

Depends on property type

Example

code = """
Effect "MyEffect" {

    Float MyProperty { value 0.5 }

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

# Will print out '0.5'
print(effect.getProperty('MyProperty'))

See also

<effect>.setProperty