Compound proxies in SM
From ParaQ Wiki
Jump to navigationJump to search
Compound proxies support grouping of multiple proxies, saving their state and instantiating them. A compound proxy is created as follows:
compound = vtkSMCompoundProxy() compound.AddProxy("first", shrink) compound.AddProxy("second", clip) compound.AddProxy("this", exodus)
Once a compound proxy is created, the proxies it contains can be obtained through the following methods:
// Description: // Returns a sub-proxy. Returns 0 if sub-proxy does not exist. vtkSMProxy* GetProxy(const char* name); // Description: // Returns a sub-proxy. Returns 0 if sub-proxy does not exist. vtkSMProxy* GetProxy(unsigned int index); // Description: // Returns the name used to store sub-proxy. Returns 0 if sub-proxy does // not exist. const char* GetProxyName(unsigned int index); // Description: // Returns the number of sub-proxies. unsigned int GetNumberOfProxies();