#
# This example demonstrates how to add entries to 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" );
posx = pointLight.Kinematics.Local.posx
posxOverride = override.AddParameterEntry2( posx )
app.SetValue( posxOverride.FullName, -4.0 )
softLightColor = pointLight.Shaders("soft_light").Color
softLightColor.Red = 0.5
softLightColor.Blue = 0.5
softLightColorOverride = override.AddParameterEntry2( softLightColor )
app.SIApplyShaderToCnxPoint( "Shaders\\Texture\\Color_Channels\\RGBA_combine.Preset", softLightColorOverride )
log("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ")
log("posxOverride : " + posxOverride.FullName );
log("posxOverride value: " + str(posxOverride.Value) )
log("posxOverride original value: " + str(posxOverride.OriginalValue) )
log("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ")
log("softLightColorOverride : " + softLightColorOverride.FullName );
log("softLightColorOverride value: " + str(softLightColorOverride.Value) )
log("softLightColorOverride source: " + str(softLightColorOverride.Source) )
log("softLightColorOverride original value: " + str(softLightColorOverride.OriginalValue) )
# Output
# INFO : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **
# INFO : posxOverride : Point.PointOverride.posx
# INFO : posxOverride value: -4.0
# INFO : posxOverride original value: 0.0
# INFO : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **
# INFO : softLightColorOverride : Point.PointOverride.light-soft_light-color
# INFO : softLightColorOverride value: light-soft_light-color
# INFO : softLightColorOverride source: Point.PointOverride.RGBA_combine
# INFO : softLightColorOverride original value: <win32com.gen_py.Softimage Object Model Library v1.5.Color instance at 0x480184680>
|