#include <xsi_proxyparameter.h>
A ProxyParameter is a kind of Parameter that can be created on a CustomProperty which is "linked" with the value of another Parameter somewhere else in the Scene.
Both the "Master Parameter" and the ProxyParameter always have the same value and changing the value of the proxy parameter is equivalent to changing the value of the master parameter.
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); CustomProperty cpset; root.AddCustomProperty(L"MyCustomPSet", false, cpset ); // For demonstration purposes, // get reference to rotx on the default scene camera CRef crefProxiedParam; crefProxiedParam.Set(L"Camera_Root.kine.local.rotx"); // Create proxy parameter to this camera parameter ProxyParameter returnedProxyParam = cpset.AddProxyParameter(Parameter(crefProxiedParam)) ; // Changing the proxy parameter will update the value on the camera object returnedProxyParam.PutValue( 47.0 ) ; CString strRotX = Parameter( crefProxiedParam ).GetValue().GetAsText() ; app.LogMessage( L"After changing proxy param value the rot X is " + strRotX ) ; // You can remove a proxy parameter like this cpset.RemoveParameter( returnedProxyParam ) ;
Public Member Functions |
|
ProxyParameter () | |
~ProxyParameter () | |
ProxyParameter (const CRef &in_ref) | |
ProxyParameter (const ProxyParameter &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
ProxyParameter & | operator= (const ProxyParameter &in_obj) |
ProxyParameter & | operator= (const CRef &in_ref) |
Parameter | GetMasterParameter () const |
ProxyParameter | ( | ) |
Default constructor.
~ProxyParameter | ( | ) |
Default destructor.
ProxyParameter | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
ProxyParameter | ( | const ProxyParameter & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from Parameter.
siClassID GetClassID | ( | ) | const [virtual] |
ProxyParameter& operator= | ( | const ProxyParameter & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
ProxyParameter& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from Parameter.
Parameter GetMasterParameter | ( | ) | const |
Returns the parameter that is referenced by a proxy parameter. If this parameter is not a proxy parameter then an empty object is returned.