Object Hierarchy | Related C++ Class: Override
Override
v7.0
This object represents an Override property. An override contains the parameters that are used for replacing
an object's parameter with another value or a shader without removing the original object parameter.
Parameters whose values are overridden by another parameter's value are called 'overridden parameters'
and the parameters stored in the override property whose values are used to override an overridden
parameter are called 'overriding parameters'.
Override properties are created via the SceneItem.AddProperty method or either the
SIAddProp or AddProp commands.
See the Softimage User Guide for further details.
# # This example demonstrates how to create and access override parameters # from win32com.client import constants as c app = Application log = app.LogMessage # Set up Point light app.NewScene(None, 0) pointLight = app.GetPrimLight("Point.Preset", "Point") softLightColor = pointLight.Shaders("soft_light").Color softLightColor.Red = 0.5 softLightColor.Blue = 0.5 # Create the override pointLight.AddProperty("Override", 0, "PointOverride") # Get the override from its owner object override = pointLight.Properties("PointOverride") # Add a posx parameter to the override and set an override value posx = pointLight.Kinematics.Local.posx posx.Value = 5.0 override.AddParameterEntry(posx) app.SetValue(override.posx.FullName, -4.0) # Add a soft_light color parameter to the override and use a # shader as the overriding object app.SIApplyShaderToCnxPoint( "Shaders\\Texture\\Color_Channels\\RGBA_combine.Preset", override.AddParameterEntry(softLightColor) ) # Get the posx parameter from the override and use it # to find the parameter it's overriding overridingPosx = override.ParameterEntries("posx") overridenPosx = overridingPosx.OverridenObject log("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ") log("Overriding posx: " + overridingPosx.FullName) log("Overriding posx value: " + str(overridingPosx.Value)) log("Overriding posx original value: " + str(overridingPosx.OriginalValue)) log("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ") log("Overriden posx: " + overridenPosx.FullName) log("Overriden posx value: " + str(overridenPosx.Value)) log("Overriden posx original value: " + str(overridenPosx.OriginalValue)) # INFO : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** # INFO : Overriding posx: Point.PointOverride.posx # INFO : Overriding posx value: -4.0 # INFO : Overriding posx original value: 5.0 # INFO : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** # INFO : Overriden posx: Point.kine.local.posx # INFO : Overriden posx value: -4.0 # INFO : Overriden posx original value: 5.0 |