Compound proxies in SM

From ParaQ Wiki
Revision as of 09:22, 6 January 2006 by Berk (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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();