Override

Object Hierarchy | Related C++ Class: Override | Supported Parameter List: Override

Inheritance

    SIObject
       ProjectItem
           Property
              Override

Introduced

7.0

Description

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. You can get pointers to existing Override objects like any other property on an object:

oOverride = oObjectWithOverride.Properties("MyOverride")

Methods

AddCustomOp | AddParameterEntry | AddScriptedOp | AddScriptedOpFromFile
AnimatedParameters2 | BelongsTo | EvaluateAt | GetAllShaders
GetICEAttributeFromName | IsA | IsAnimated2 | IsClassOf
IsEqualTo | IsKindOf | IsLocked | IsSelected
LockOwners | RemoveAllEntries | RemoveParameterEntry | SetAsSelected
SetCapabilityFlag | SetLock | TaggedParameters | UnSetLock

Properties

AllImageClips | Application | Branch | BranchFlag
Capabilities | Categories | Families | FullName
Help | ICEAttributes | LockLevel | LockMasters
LockType | Model | Name | NestedObjects
ObjectID | Origin | OriginPath | Owners
ParameterEntries | Parameters | Parent | Parent3DObject
PPGLayout | Selected | Singleton | Type

Examples

Python Example

    #
    # 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

    # Get the soft_light color parameter from the override and use it
    # to find the overriding object
    overridingColor = override.ParameterEntries("light-soft_light-color")
    overridingColorSource = overridingColor.Source
    overridingColorOriginalValue = overridingColor.OriginalValue

    log("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ")
    log("Overriding color: " + overridingColorSource.FullName)
    log("Overriding color value: " + str(overridingColorSource.red.value) +":"
       + str(overridingColorSource.green.value)+":"
       + str(overridingColorSource.blue.value)+":"
       + str(overridingColorSource.alpha.value)
    )
    log("Overriding color original value: " + str(overridingColorOriginalValue.Red) +":"
       + str(overridingColorOriginalValue.Green)+":"
       + str(overridingColorOriginalValue.Blue)+":"
       + str(overridingColorOriginalValue.Alpha)
    )
    # INFO : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **
    # INFO : Overriding color: Point.PointOverride.RGBA_combine
    # INFO : Overriding color value: 1.0:1.0:1.0:1.0
    # INFO : Overriding color original value: 0.5:1.0:0.5:0.0

    # Use the soft_light's overriding object to get the object being overridden
    overridenColor = overridingColor.OverridenObject
    overridenColorValue = overridenColor.Value
    overridenColorOriginalValue = overridenColor.OriginalValue

    log("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ")
    log("Overriden color: " + overridenColor.FullName)
    log("Overriden color value: " + str(overridenColorValue.Red) +":"
       + str(overridenColorValue.Green)+":"
       + str(overridenColorValue.Blue)+":"
       + str(overridenColorValue.Alpha)
    )
    log("Overriden color original value: " + str(overridenColorOriginalValue.Red) +":"
       + str(overridenColorOriginalValue.Green)+":"
       + str(overridenColorOriginalValue.Blue)+":"
       + str(overridenColorOriginalValue.Alpha)
    )
    # INFO : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **
    # INFO : Overriden color: Point.light.soft_light.color
    # INFO : Overriden color value: 0.5:1.0:0.5:0.0
    # INFO : Overriden color original value: 0.5:1.0:0.5:0.0

See Also

Parameter.OverridenObject | Parameter.OverridingObject | Parameter.OriginalValue | SceneItem.Properties

Autodesk Softimage v7.5