********************************
OmniGraph Representations in USD
********************************

Each of the components of an OmniGraph are represented using native USD elements for maximum compatibility. Sometimes
extra data will be encoded in metadata or ancillary attributes where functionality is needed that isn't provided by
standard USD.

This page only describes the representation of the elements and values in USD. See the full documentation for more
detailed descriptions of what they are and what they do.

OmniGraph Graphs In USD
=======================
All graphs in OmniGraph are represented as a prim, using the `OmniGraph` schema. The schema adds five standard
attributes to all graph prims that describe the settings used for evaluation of that graph.

::

	def OmniGraph "MyGraph"
	{
		token evaluator:type
		int2 fileFormatVersion
		token flatCacheBacking
		token pipelineStage
		token evaluationMode
	}

**evaluator:type** is the type name for the evaluator the graph uses to run its computation. Legal values for the
built-in evaluators are *dirty_push*, *push*, *pull*, *execution*, and *execution_pull*.

**fileFormatVersion** is a pair of integers consisting of the major and minor versions of the file format under which
the graph was saved. This allows graphs to be processed for backward compatibility.

**flatCacheBacking** identifies the type of FlatCache backing used by the graph for its evaluation data. Legal values
are *Shared*, *StagedWithHistory*, and *StagedWithoutHistory*.

**pipelineStage** is used to indicate the section of the orchestration graph in which this graph lives. Legal values are
*pipelineStageSimulation*, *pipelineStagePreRender*, *pipelineStagePostRender*, and *pipelineStageOnDemand*.

**evaluationMode** is used to indicate whether the graph should evaluate standalone, or only when instanced. Legal 
values are *Automatic*, *Standalone* and *Instanced*

These graph prims can appear at any level in the prim hierarchy, including the root level.

::

	def OmniGraph "MyGraph"
	{
		token evaluator:type = "push"
		int2 fileFormatVersion = (1, 2)
		token flatCacheBacking = "Shared"
		token pipelineStage = "piplineStageSimulation"
	}

.. note::

	The only type of prims that can appear as a child of the **OmniGraph** prim are described below.

OmniGraph Nodes in USD
======================

OmniGraph nodes always appear as the child of an **OmniGraph** prim in USD since all OmniGraph nodes must be children
of a specific OmniGraph. They are constructed using the **OmniGraphNode** schema.

::

	def OmniGraphNode "SimpleNode"
	{
		token node:type
		int node:typeVersion
	}

**node:type** is the unique identifier for the name of the registered type of the node.

**node:typeVersion** is the node type version number. Each node type is versioned for enabling backward compatibility.
This value indicates which version of the node type definition was used to create this node. By convention the version
numbers start at 1.
