def get_all_inputs_registered(proxy): """Given a servermanager.Proxy, check if the proxy's Inputs have been registered with smtrace. Returns True if all inputs are registered or proxy does not have an Input property, else returns False.""" input_property = proxy.GetProperty("Input") if input_property: for i in xrange(input_property.GetNumberOfProxies()): input_proxy = input_property.GetProxy(i) info = smtrace.get_proxy_info(input_proxy, search_existing=False) if not info: return False return True
def get_all_inputs_registered(proxy): """Given a servermanager.Proxy, check if the proxy's Inputs have been registered with smtrace. Returns True if all inputs are registered or proxy does not have an Input property, else returns False.""" itr = servermanager.PropertyIterator(proxy.SMProxy) for prop in itr: if prop.IsA("vtkSMInputProperty"): # Don't worry about input properties with ProxyListDomains, # these input proxies do not need to be constructed by python. if prop.GetDomain("proxy_list") is not None: return True for i in xrange(prop.GetNumberOfProxies()): input_proxy = prop.GetProxy(i) info = smtrace.get_proxy_info(input_proxy, search_existing=False) if not info: return False return True
def get_all_inputs_registered(proxy): """Given a servermanager.Proxy, check if the proxy's Inputs have been registered with smtrace. Returns True if all inputs are registered or proxy does not have an Input property, else returns False.""" itr = servermanager.PropertyIterator(proxy.SMProxy) for prop in itr: if prop.IsA("vtkSMInputProperty"): # Don't worry about input properties with ProxyListDomains, # these input proxies do not need to be constructed by python. if prop.GetDomain("proxy_list") is not None: continue # Some representations have an InternalInput property which does # not need to be managed by python, so ignore these if proxy.GetPropertyName(prop).startswith("InternalInput"): continue for i in xrange(prop.GetNumberOfProxies()): input_proxy = prop.GetProxy(i) info = smtrace.get_proxy_info(input_proxy, search_existing=False) if not info: return False return True