コード例 #1
0
ファイル: smtrace.py プロジェクト: ObjectivitySRC/ParaViewGeo
def get_property_value_from_list_domain(proxyInfo, propInfo):
  """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.registered_proxies."""
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
    proxyPropertyValue = prop.GetProxy(0)
    listdomain = prop.GetDomain('proxy_list')
    if listdomain:
      for i in xrange(listdomain.GetNumberOfProxies()):
        if listdomain.GetProxy(i) == proxyPropertyValue:
          info = get_proxy_info(proxyPropertyValue)
          if not info:
            info = proxy_trace_info(proxyPropertyValue, "helpers", pythonProp.Available[i])
          info.PyVariable = propInfo.PyVariable
          info.ParentProxyInfo = proxyInfo
          info.ctor_traced = True
          trace_globals.registered_proxies.append(info)

          # If capture_all_properties, record all the properties of this proxy
          if trace_globals.capture_all_properties:
            itr = servermanager.PropertyIterator(proxyPropertyValue)
            for prop in itr:
              if prop.GetInformationOnly() or prop.GetIsInternal(): continue
              trace_property_modified(info, prop)


          return "\"%s\"" % pythonProp.Available[i]
  return None
コード例 #2
0
ファイル: smtrace.py プロジェクト: adammoon/ParaView
def get_property_value_from_list_domain(proxyInfo, propInfo):
  """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.modified_proxies."""
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
    proxyPropertyValue = prop.GetProxy(0)
    listdomain = prop.GetDomain('proxy_list')
    if listdomain:
      for i in xrange(listdomain.GetNumberOfProxies()):
        if listdomain.GetProxy(i) == proxyPropertyValue:
          info = get_proxy_info(proxyPropertyValue)
          if not info:
            info = proxy_trace_info(proxyPropertyValue, "helpers", pythonProp.Available[i])
            info.ctor_traced = True
            # add this to known_proxies. Thus we don't ever record that the
            # proxy is "registered" or "created", but we know about it when any
            # of its properties change.
            trace_globals.known_proxies.append(info)

          info.PyVariable = propInfo.PyVariable
          info.ParentProxyInfo = proxyInfo

          # If capture_all_properties, record all the properties of this proxy
          trace_proxy_properties(info)

          return "\"%s\"" % pythonProp.Available[i]
  return None
コード例 #3
0
ファイル: smtrace.py プロジェクト: worst-nick-ever/ParaView
def get_property_value_from_list_domain(proxyInfo, propInfo):
    """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.modified_proxies."""
    proxy = proxyInfo.Proxy
    prop = propInfo.Prop
    pythonProp = servermanager._wrap_property(proxy, prop)
    if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
        proxyPropertyValue = prop.GetProxy(0)
        listdomain = prop.GetDomain('proxy_list')
        if listdomain:
            for i in xrange(listdomain.GetNumberOfProxies()):
                if listdomain.GetProxy(i) == proxyPropertyValue:
                    info = get_proxy_info(proxyPropertyValue)
                    if not info:
                        info = proxy_trace_info(proxyPropertyValue, "helpers",
                                                pythonProp.Available[i])
                        info.ctor_traced = True
                        # add this to known_proxies. Thus we don't ever record that the
                        # proxy is "registered" or "created", but we know about it when any
                        # of its properties change.
                        trace_globals.known_proxies.append(info)

                    info.PyVariable = propInfo.PyVariable
                    info.ParentProxyInfo = proxyInfo

                    # If capture_all_properties, record all the properties of this proxy
                    trace_proxy_properties(info)

                    return "\"%s\"" % pythonProp.Available[i]
    return None
コード例 #4
0
ファイル: smtrace.py プロジェクト: thomasflyvholm/ParaView
def get_property_value_from_list_domain(proxyInfo, propInfo):
  """Given a proxy and one of its proxyproperties (or inputproperty),
  get the value of the property as a string IF the property has a
  proxy list domain, else return None.  For more information see the class
  method servermanager.ProxyProperty.GetAvailable.  As a side effect of
  calling this method, the current property value (which is another proxy)
  may be tracked by adding it to trace_globals.registered_proxies."""
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  if len(pythonProp.Available) and prop.GetNumberOfProxies() == 1:
    proxyPropertyValue = prop.GetProxy(0)
    listdomain = prop.GetDomain('proxy_list')
    if listdomain:
      for i in xrange(listdomain.GetNumberOfProxies()):
        if listdomain.GetProxy(i) == proxyPropertyValue:
          info = get_proxy_info(proxyPropertyValue)
          if not info:
            info = proxy_trace_info(proxyPropertyValue, "helpers", pythonProp.Available[i])
          info.PyVariable = propInfo.PyVariable
          info.ParentProxyInfo = proxyInfo
          info.ctor_traced = True
          trace_globals.registered_proxies.append(info)

          # If capture_all_properties, record all the properties of this proxy
          if trace_globals.capture_all_properties:
            itr = servermanager.PropertyIterator(proxyPropertyValue)
            for prop in itr:
              if prop.GetInformationOnly() or prop.GetIsInternal(): continue
              trace_property_modified(info, prop)


          return "\"%s\"" % pythonProp.Available[i]
  return None
コード例 #5
0
ファイル: smtrace.py プロジェクト: ObjectivitySRC/ParaViewGeo
def vector_smproperty_tostring(proxyInfo, propInfo):
  proxy = proxyInfo.Proxy
  prop = propInfo.Prop
  pythonProp = servermanager._wrap_property(proxy, prop)
  return str(pythonProp)
コード例 #6
0
def vector_smproperty_tostring(proxyInfo, propInfo):
    proxy = proxyInfo.Proxy
    prop = propInfo.Prop
    pythonProp = servermanager._wrap_property(proxy, prop)
    return str(pythonProp)