pymel.core.system.iterReferences

iterReferences(parentReference=None, recursive=False, namespaces=False, refNodes=False, references=True, recurseType='depth', loaded=None, unloaded=None)

returns references in the scene as a list of value tuples.

The values in the tuples can be namespaces, refNodes (as PyNodes), and/or references (as FileReferences), and are controlled by their respective keywords (and are returned in that order). If only one of the three options is True, the result will not be a list of value tuples, but will simply be a list of values.

Parameters:
  • parentReference (string, Path, or FileReference) – a reference to get sub-references from. If None (default), the current scene is used.
  • recursive (bool) – recursively determine all references and sub-references
  • namespaces (bool) – controls whether namespaces are returned
  • refNodes (bool) – controls whether reference PyNodes are returned
  • refNodes (bool) – controls whether FileReferences returned
  • recurseType (string) – if recursing, whether to do a ‘breadth’ or ‘depth’ first search; defaults to a ‘depth’ first
  • loaded (bool or None) – whether to return loaded references in the return result; if both of loaded/unloaded are not given (or None), then both are assumed True; if only one is given, the other is assumed to have the opposite boolean value
  • unloaded (bool or None) – whether to return unloaded references in the return result; if both of loaded/unloaded are not given (or None), then both are assumed True; if only one is given, the other is assumed to have the opposite boolean value