SIGetOriginalValueO fOverridden

Introduced

6.5

Description

Returns the original value of the specified (overridden) parameter as if the override were muted.

Scripting Syntax

    SIGetOriginalValueOfOverridden( Target, [Time] )

Parameters

Parameter | Type | Description
Target | String | Parameter from which to return the unoverridden value.
Time | Double | Frame at which to get the value. Default Value: Current frame.

Return Value

Arrayof parameter value(s). If the parameter passed in is a color, then the returned values will be in R,G,B,A order.

Examples

JScript Example

    /*
       Demonstrates how to read the original (non-overridden values)
       values of the Point Light parameters
    */
    NewScene(null, false);

    // Set up the scene
    GetPrimLight("Point.Preset", "Point");
    SetValue("Point.light.soft_light.color.red", 0.3);
    SetValue("Point.light.soft_light.color.green", 0.4);
    SetValue("Point.light.soft_light.color.blue", 0.5);
    SetValue("Point.kine.local.pos.posx", 5);
    SetKey("Point.kine.local.posx", 1, 5);
    SetKey("Point.kine.local.posx", 100, 15);
    AddProp("Override", "Point", siBranchPropagation);
    SIAddParameterEntryToOverride("Point.Override", "Point.kine.local.pos.posx, Point.kine.local.pos.posy, Point.kine.local.pos.posz");
    SIAddParameterEntryToOverride("Point.Override", "Point.light.soft_light.color");
    SetValue("Point.Override.posx", -4);
    SetKey("Point.Override.posx", 1, -4);
    SetKey("Point.Override.posx", 100, 4);
    SIApplyShaderToCnxPoint("Image", "Point.Override.light-LightShader-soft_light-color");

    // Move the play control
    SetValue("PlayControl.Key", 50);
    SetValue("PlayControl.Current", 50);

    var overriddenParams = SIGetOverriddenParameters("Point.Override.Entries.entry");
    for (var i=0; i<overriddenParams.Count; i++) {
       // Get the unoverridden value
       var oParam = overriddenParams(i);
       var vbArr = SIGetOriginalValueOfOverridden(oParam);

       // Convert the VBArray to a native JScript array
       var jsArr = vbArr.toArray();
       Application.LogMessage("Original value(s)   - " + oParam + " -> " + jsArr.toString());

       // Get the overridden value
       var val = oParam.Value;
       Application.LogMessage("Overridden value - " + oParam + " -> " + val);
    }

    overriddenParams = SIGetOverriddenParameters("Point.Override.Entries.entry[3]");
    for (i=0; i<overriddenParams.Count; i++) {
       // Get the unoverridden value
       var oParam = overriddenParams(i);
       var vbArr = SIGetOriginalValueOfOverridden(oParam);

       // Convert the VBArray to a native JScript array
       var jsArr = vbArr.toArray();
       Application.LogMessage("Original value(s)   - " + oParam + " -> " + jsArr.toString());

       // Get the overridden value
       var val = oParam.Value;
       Application.LogMessage("Overridden value is image source - " + oParam.Source.FullName);
    }

    // Output:
    // INFO : Original value(s)   - Point.kine.local.posx -> 9.924245000767802
    // INFO : Overridden value - Point.kine.local.posx -> -0.06060399938575811
    // INFO : Original value(s)   - Point.light.soft_light.color -> 0.30000001192092895,0.4000000059604645,0.5,0
    // INFO : Overridden value is image source - Point.Override.Image

See Also

SIGetOverriddenParameters

Autodesk Softimage v7.5