v6.5
Returns the original value of the specified (overridden) parameter as if the override were muted.
oArray = SIGetOriginalValueOfOverridden( Target, [Time] ); |
Arrayof parameter value(s). If the parameter passed in is a color, then the returned values will be in R,G,B,A order.
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. |
/* 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); CreateShaderFromProgID("Softimage.txt2d-image-explicit.1.0", "Point.light", null); SIConnectShaderToCnxPoint("Point.light.Image.out", "Point.light.soft_light.color", false); // 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); } // Output: // INFO : Original value(s) - Point.kine.local.posx -> 9.924245000767802 // INFO : Overridden value - Point.kine.local.posx -> -0.06060399938575811 |