#
# This example demonstrates how to remove entries from an override property
#
from win32com.client import constants as c
app = Application
log = app.LogMessage
app.NewScene(None, 0);
pointLight = app.GetPrimLight("Point.Preset", "Point")
# Create/fill the override
override = pointLight.AddProperty("Override", 0, "PointOverride" );
softLightColor = pointLight.Shaders("soft_light").Color
softLightColor.Red = 0.5
softLightColor.Blue = 0.5
# Set override values
app.SIApplyShaderToCnxPoint( "Shaders\\Texture\\Color_Channels\\RGBA_combine.Preset", override.AddParameterEntry2( softLightColor ) )
overridingColor = override.ParameterEntries( "light-soft_light-color" )
log( "override.ParameterEntries.Count: " + str(override.ParameterEntries.Count) );
override.RemoveParameterEntry( overridingColor );
log( "override.ParameterEntries.Count: " + str(override.ParameterEntries.Count) );
# Output
# INFO : override.ParameterEntries.Count: 1
# INFO : override.ParameterEntries.Count: 0
|