Source (Parameter)

Description

Returns a parameter's DataSource (the object that is driving the parameter's value, such as a Shader or an ActionSource). If no data source is connected then Nothing is returned. If a parameter has both ActionSource and a DataSource, it's the DataSource that is returned. This happens when an animated parameter is connected to a source.

Note: You can Get any type of data source (ActionSource, Constraint, FCurve, ImageClip, Operator, Shader, StaticSource), but you can only Set the shader type of data source. Shader parameters support setting the source to another shader. Note: Shader Compounds and Multi-Output Shaders have multiple output ports that require the Source to be identified by an Output Parameter. In such case, GetSource will return a Parameter and you can access the connected shader by calling Parameter.GetParent.

Tip: In VBScript it is possible to remove a DataSource by assigning "Nothing" to the Source property. In JScript and Python the same effect can be achieved by calling Parameter.Disconnect.

In the case of a ProxyParameter, the source of the master parameter is accessible from this property. For example, if a parameter has an fcurve on it, and there is a proxy parameter to that parameter, then the Source property of both parameter objects will return the same fcurve object.

C# Syntax

// get accessor
DataSource rtn = Parameter.Source;

// set accessor
Parameter.Source = DataSource;

See Also

Parameter.Sources

FCurve

Parameter.AddFCurve

Parameter.AddFCurve2

Parameter.Disconnect

ProxyParameter.MasterParameter

Expression

Constraint

Operator

Shader

Shader.GetShaderParameterTargets

 

Examples

• See Parameter.Source.1.vbs

• See Parameter.Source.2.js



Autodesk Softimage 2011