from __future__ import annotations
import pxr.UsdUtils._usdUtils
import typing
import Boost.Python

__all__ = [
    "AuthorCollection",
    "CoalescingDiagnosticDelegate",
    "CoalescingDiagnosticDelegateItem",
    "CoalescingDiagnosticDelegateSharedItem",
    "CoalescingDiagnosticDelegateUnsharedItem",
    "ComputeAllDependencies",
    "ComputeCollectionIncludesAndExcludes",
    "ComputeUsdStageStats",
    "ConditionalAbortDiagnosticDelegate",
    "ConditionalAbortDiagnosticDelegateErrorFilters",
    "CopyLayerMetadata",
    "CreateCollections",
    "CreateNewARKitUsdzPackage",
    "CreateNewUsdzPackage",
    "ExtractExternalReferences",
    "FlattenLayerStack",
    "FlattenLayerStackResolveAssetPath",
    "GenerateClipManifestName",
    "GenerateClipTopologyName",
    "GetAlphaAttributeNameForColor",
    "GetDirtyLayers",
    "GetMaterialsScopeName",
    "GetModelNameFromRootLayer",
    "GetPrefName",
    "GetPrimAtPathWithForwarding",
    "GetPrimaryCameraName",
    "GetPrimaryUVSetName",
    "GetRegisteredVariantSets",
    "ModifyAssetPaths",
    "RegisteredVariantSet",
    "SparseAttrValueWriter",
    "SparseValueWriter",
    "StageCache",
    "StitchClips",
    "StitchClipsManifest",
    "StitchClipsTemplate",
    "StitchClipsTopology",
    "StitchInfo",
    "StitchLayers",
    "TimeCodeRange",
    "UninstancePrimAtPath",
    "UsdStageStatsKeys"
]


class CoalescingDiagnosticDelegate(Boost.Python.instance):
    """
    A class which collects warnings and statuses from the Tf diagnostic
    manager system in a thread safe manner.


    This class allows clients to get both the unfiltered results, as well
    as a compressed view which deduplicates diagnostic events by their
    source line number, function and file from which they occurred.
    """
    @staticmethod
    def DumpCoalescedDiagnosticsToStderr(*args, **kwargs) -> None: ...
    @staticmethod
    def DumpCoalescedDiagnosticsToStdout(*args, **kwargs) -> None: ...
    @staticmethod
    def DumpUncoalescedDiagnostics(ostr) -> None: 
        """
        DumpUncoalescedDiagnostics(ostr) -> None


        Print all pending diagnostics without any coalescing to ``ostr`` .



        This method clears the pending diagnostics.


        Parameters
        ----------
        ostr : ostream
        """
    @staticmethod
    def TakeCoalescedDiagnostics() -> list[UsdUtilsCoalescingDiagnosticDelegate]: 
        """
        TakeCoalescedDiagnostics() -> list[UsdUtilsCoalescingDiagnosticDelegate]


        Get all pending diagnostics in a coalesced form.



        This method clears the pending diagnostics.
        """
    @staticmethod
    def TakeUncoalescedDiagnostics() -> list[TfDiagnosticBase]: 
        """
        TakeUncoalescedDiagnostics() -> list[TfDiagnosticBase]


        Get all pending diagnostics without any coalescing.



        This method clears the pending diagnostics.
        """
    __instance_size__ = 48
    pass
class CoalescingDiagnosticDelegateItem(Boost.Python.instance):
    """
    An item used in coalesced results, containing a shared component: the
    file/function/line number, and a set of unshared components: the call
    context and commentary.
    """
    @property
    def sharedItem(self) -> None:
        """
        :type: None
        """
    @property
    def unsharedItems(self) -> None:
        """
        :type: None
        """
    pass
class CoalescingDiagnosticDelegateSharedItem(Boost.Python.instance):
    """
    The shared component in a coalesced result This type can be thought of
    as the key by which we coalesce our diagnostics.
    """
    @property
    def sourceFileName(self) -> None:
        """
        :type: None
        """
    @property
    def sourceFunction(self) -> None:
        """
        :type: None
        """
    @property
    def sourceLineNumber(self) -> None:
        """
        :type: None
        """
    pass
class CoalescingDiagnosticDelegateUnsharedItem(Boost.Python.instance):
    """
    The unshared component in a coalesced result.
    """
    @property
    def commentary(self) -> None:
        """
        :type: None
        """
    @property
    def context(self) -> None:
        """
        :type: None
        """
    pass
class ConditionalAbortDiagnosticDelegate(Boost.Python.instance):
    """
    A class that allows client application to instantiate a diagnostic
    delegate that can be used to abort operations for a non fatal USD
    error or warning based on immutable include exclude rules defined for
    this instance.


    These rules are regex strings where case sensitive matching is done on
    error/warning text or the location of the code path where the
    error/warning occured. Note that these rules will be respected only
    during the lifetime of the delegate. Include Rules determine what
    errors or warnings will cause a fatal abort. Exclude Rules determine
    what errors or warnings matched from the Include Rules should not
    cause the fatal abort. Example: to abort on all errors and warnings
    coming from"\*pxr\*"codepath but not
    from"\*ConditionalAbortDiagnosticDelegate\*", a client can create
    the following delegate:

    .. code-block:: text

      UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters includeFilters;
      UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters excludeFilters;
      includeFilters.SetCodePathFilters({"\*pxr\*"});
      excludeFilters.SetCodePathFilters({"\*ConditionalAbortDiagnosticDelegate\*"});
      UsdUtilsConditionalAbortDiagnosticDelegate delegate = 
          UsdUtilsConditionalAbortDiagnosticDelegate(includeFilters,
              excludeFilters);
    """
    __instance_size__ = 120
    pass
class ConditionalAbortDiagnosticDelegateErrorFilters(Boost.Python.instance):
    """
    A class which represents the inclusion exclusion filters on which
    errors will be matched stringFilters: matching and filtering will be
    done on explicit string of the error/warning codePathFilters: matching
    and filtering will be done on errors/warnings coming from a specific
    usd code path.
    """
    @staticmethod
    def GetCodePathFilters() -> list[str]: 
        """
        GetCodePathFilters() -> list[str]
        """
    @staticmethod
    def GetStringFilters() -> list[str]: 
        """
        GetStringFilters() -> list[str]
        """
    @staticmethod
    def SetCodePathFilters(codePathFilters) -> None: 
        """
        SetCodePathFilters(codePathFilters) -> None


        Parameters
        ----------
        codePathFilters : list[str]
        """
    @staticmethod
    def SetStringFilters(stringFilters) -> None: 
        """
        SetStringFilters(stringFilters) -> None


        Parameters
        ----------
        stringFilters : list[str]
        """
    __instance_size__ = 64
    pass
class RegisteredVariantSet(Boost.Python.instance):
    """
    Info for registered variant set
    """
    class SelectionExportPolicy(Boost.Python.enum, int):
        """
        This specifies how the variantSet should be treated during export.


        Note, in the plugInfo.json, the values for these enum's are
        lowerCamelCase.
        """
        Always = pxr.UsdUtils.SelectionExportPolicy.Always
        IfAuthored = pxr.UsdUtils.SelectionExportPolicy.IfAuthored
        Never = pxr.UsdUtils.SelectionExportPolicy.Never
        __slots__ = ()
        names = {'IfAuthored': pxr.UsdUtils.SelectionExportPolicy.IfAuthored, 'Always': pxr.UsdUtils.SelectionExportPolicy.Always, 'Never': pxr.UsdUtils.SelectionExportPolicy.Never}
        values = {1: pxr.UsdUtils.SelectionExportPolicy.IfAuthored, 2: pxr.UsdUtils.SelectionExportPolicy.Always, 0: pxr.UsdUtils.SelectionExportPolicy.Never}
        pass
    @property
    def name(self) -> None:
        """
        :type: None
        """
    @property
    def selectionExportPolicy(self) -> None:
        """
        :type: None
        """
    pass
class SparseAttrValueWriter(Boost.Python.instance):
    """
    A utility class for authoring time-varying attribute values with
    simple run-length encoding, by skipping any redundant time-samples.
    Time-samples that are close enough to each other, with relative
    difference smaller than a fixed epsilon value are considered to be
    equivalent. This is to avoid unnecessary authoring of time-samples
    caused by numerical fuzz in certain computations.

    For vectors, matrices, and other composite types (like quaternions and
    arrays), each component is compared with the corresponding component
    for closeness. The chosen epsilon value for double precision floating
    point numbers is 1e-12. For single-precision, it is 1e-6 and for half-
    precision, it is 1e-2.

    Example c++ usage:

    .. code-block:: text

      UsdGeomSphere sphere = UsdGeomSphere::Define(stage, SdfPath("/Sphere"));
      UsdAttribute radius = sphere.CreateRadiusAttr();
      UsdUtilsSparseAttrValueWriter attrValueWriter(radius, 
              /\*defaultValue\*/ VtValue(1.0));
      attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(1.0));
      attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(2.0));
      attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(3.0));
      attrValueWriter.SetTimeSample(VtValue(20.0), UsdTimeCode(4.0));

    Equivalent python example:

    .. code-block:: text

      sphere = UsdGeom.Sphere.Define(stage, Sdf.Path("/Sphere"))
      radius = sphere.CreateRadiusAttr()
      attrValueWriter = UsdUtils.SparseAttrValueWriter(radius, defaultValue=1.0)
      attrValueWriter.SetTimeSample(10.0, 1.0)
      attrValueWriter.SetTimeSample(10.0, 2.0)
      attrValueWriter.SetTimeSample(10.0, 3.0)
      attrValueWriter.SetTimeSample(20.0, 4.0)

    In the above examples, the specified default value of radius (1.0)
    will not be authored into scene description since it matches the
    fallback value. Additionally, the time-sample authored at time=2.0
    will be skipped since it is redundant. Also note that for correct
    behavior, the calls to SetTimeSample() must be made with sequentially
    increasing time values. If not, a coding error is issued and the
    authored animation may be incorrect.
    """
    @staticmethod
    def SetTimeSample(value, time) -> bool: 
        """
        SetTimeSample(value, time) -> bool


        Sets a new time-sample on the attribute with given ``value`` at the
        given ``time`` .


        The time-sample is only authored if it's different from the previously
        set time-sample, in which case the previous time-sample is also
        authored, in order to to end the previous run of contiguous identical
        values and start a new run.

        This incurs a copy of ``value`` . Also, the value will be held in
        memory at least until the next time-sample is written or until the
        SparseAttrValueWriter instance is destroyed.


        Parameters
        ----------
        value : VtValue

        time : TimeCode



        ----------------------------------------------------------------------


        This is an overloaded member function, provided for convenience. It
        differs from the above function only in what argument(s) it accepts.

        For efficiency, this function swaps out the given ``value`` , leaving
        it empty.


        The value will be held in memory at least until the next time-sample
        is written or until the SparseAttrValueWriter instance is destroyed.


        Parameters
        ----------
        value : VtValue

        time : TimeCode
        """
    pass
class SparseValueWriter(Boost.Python.instance):
    """
    Utility class that manages sparse authoring of a set of UsdAttributes.
    It does this by maintaining a map of UsdAttributes to their
    corresponding UsdUtilsSparseAttrValueWriter objects.

    To use this class, simply instantiate an instance of it and invoke the
    SetAttribute() method with various attributes and their associated
    time-samples.

    If the attribute has a default value, SetAttribute() must be called
    with time=Default first (multiple times, if necessary), followed by
    calls to author time-samples in sequentially increasing time order.

    This class is not threadsafe. In general, authoring to a single USD
    layer from multiple threads isn't threadsafe. Hence, there is little
    value in making this class threadsafe. Example c++ usage:

    .. code-block:: text

      UsdGeomCylinder cylinder = UsdGeomCylinder::Define(stage, SdfPath("/Cylinder"));
      UsdAttribute radius = cylinder.CreateRadiusAttr();
      UsdAttribute height = cylinder.CreateHeightAttr();
      UsdUtilsSparseValueWriter valueWriter;
      valueWriter.SetAttribute(radius, 2.0, UsdTimeCode::Default());
      valueWriter.SetAttribute(height, 2.0, UsdTimeCode::Default());
      
      valueWriter.SetAttribute(radius, 10.0, UsdTimeCode(1.0));
      valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(2.0));
      valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(3.0));
      valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(4.0));
      
      valueWriter.SetAttribute(height, 2.0, UsdTimeCode(1.0));
      valueWriter.SetAttribute(height, 2.0, UsdTimeCode(2.0));
      valueWriter.SetAttribute(height, 3.0, UsdTimeCode(3.0));
      valueWriter.SetAttribute(height, 3.0, UsdTimeCode(4.0));

    Equivalent python code:

    .. code-block:: text

      cylinder = UsdGeom.Cylinder.Define(stage, Sdf.Path("/Cylinder"))
      radius = cylinder.CreateRadiusAttr()
      height = cylinder.CreateHeightAttr()
      valueWriter = UsdUtils.SparseValueWriter()
      valueWriter.SetAttribute(radius, 2.0, Usd.TimeCode.Default())
      valueWriter.SetAttribute(height, 2.0, Usd.TimeCode.Default())
      
      valueWriter.SetAttribute(radius, 10.0, 1.0)
      valueWriter.SetAttribute(radius, 20.0, 2.0)
      valueWriter.SetAttribute(radius, 20.0, 3.0)
      valueWriter.SetAttribute(radius, 20.0, 4.0)
      
      valueWriter.SetAttribute(height, 2.0, 1.0)
      valueWriter.SetAttribute(height, 2.0, 2.0)
      valueWriter.SetAttribute(height, 3.0, 3.0)
      valueWriter.SetAttribute(height, 3.0, 4.0)

    In the above example,

       - The default value of the"height"attribute is not authored into
         scene description since it matches the fallback value.

       - Time-samples at time=3.0 and time=4.0 will be skipped for the
         radius attribute.

       - For the"height"attribute, the first timesample at time=1.0 will
         be skipped since it matches the default value.

       - The last time-sample at time=4.0 will also be skipped
         for"height"since it matches the previously written value at time=3.0.
    """
    @staticmethod
    def GetSparseAttrValueWriters() -> list[SparseAttrValueWriter]: 
        """
        GetSparseAttrValueWriters() -> list[SparseAttrValueWriter]


        Returns a new vector of UsdUtilsSparseAttrValueWriter populated from
        the attrValueWriter map.
        """
    @staticmethod
    def SetAttribute(attr, value, time) -> bool: 
        """
        SetAttribute(attr, value, time) -> bool


        Sets the value of ``attr`` to ``value`` at time ``time`` .


        The value is written sparsely, i.e., the default value is authored
        only if it is different from the fallback value or the existing
        default value, and any redundant time-samples are skipped when the
        attribute value does not change significantly between consecutive
        time-samples.


        Parameters
        ----------
        attr : Attribute

        value : VtValue

        time : TimeCode



        ----------------------------------------------------------------------


        This is an overloaded member function, provided for convenience. It
        differs from the above function only in what argument(s) it accepts.
        For efficiency, this function swaps out the given ``value`` , leaving
        it empty.


        The value will be held in memory at least until the next time-sample
        is written or until the SparseAttrValueWriter instance is destroyed.


        Parameters
        ----------
        attr : Attribute

        value : VtValue

        time : TimeCode



        ----------------------------------------------------------------------


        This is an overloaded member function, provided for convenience. It
        differs from the above function only in what argument(s) it accepts.


        Parameters
        ----------
        attr : Attribute

        value : T

        time : TimeCode
        """
    __instance_size__ = 80
    pass
class StageCache(Boost.Python.instance):
    """
    The UsdUtilsStageCache class provides a simple interface for handling
    a singleton usd stage cache for use by all USD clients. This way code
    from any location can make use of the same cache to maximize stage
    reuse.
    """
    @staticmethod
    def Get(*args, **kwargs) -> None: 
        """
        **classmethod** Get() -> StageCache


        Returns the singleton stage cache.
        """
    @staticmethod
    def GetSessionLayerForVariantSelections(*args, **kwargs) -> None: 
        """
        **classmethod** GetSessionLayerForVariantSelections(modelName, variantSelections) -> Layer


        Given variant selections as a vector of pairs (vector in case order
        matters to the client), constructs a session layer with overs on the
        given root modelName with the variant selections, or returns a cached
        session layer with those opinions.


        Parameters
        ----------
        modelName : str

        variantSelections : list[tuple[str, str]]
        """
    __instance_size__ = 24
    pass
class TimeCodeRange(Boost.Python.instance):
    """
    Represents a range of UsdTimeCode values as start and end time codes
    and a stride value.

    A UsdUtilsTimeCodeRange can be iterated to retrieve all time code
    values in the range. The range may be empty, it may contain a single
    time code, or it may represent multiple time codes from start to end.
    The interval defined by the start and end time codes is closed on both
    ends.

    Note that when constructing a UsdUtilsTimeCodeRange,
    UsdTimeCode::EarliestTime() and UsdTimeCode::Default() cannot be used
    as the start or end time codes. Also, the end time code cannot be less
    than the start time code for positive stride values, and the end time
    code cannot be greater than the start time code for negative stride
    values. Finally, the stride value cannot be zero. If any of these
    conditions are not satisfied, then an invalid empty range will be
    returned.
    """
    class Tokens(Boost.Python.instance):
        EmptyTimeCodeRange = 'NONE'
        RangeSeparator = ':'
        StrideSeparator = 'x'
        pass
    class _Iterator(Boost.Python.instance):
        pass
    @staticmethod
    def CreateFromFrameSpec(*args, **kwargs) -> None: 
        """
        **classmethod** CreateFromFrameSpec(frameSpec) -> TimeCodeRange


        Create a time code range from ``frameSpec`` .


        A FrameSpec is a compact string representation of a time code range. A
        FrameSpec may contain up to three floating point values for the start
        time code, end time code, and stride values of a time code range.

        A FrameSpec containing just a single floating point value represents a
        time code range containing only that time code.

        A FrameSpec containing two floating point values separated by the
        range separator (':') represents a time code range from the first
        value as the start time code to the second values as the end time
        code.

        A FrameSpec that specifies both a start and end time code value may
        also optionally specify a third floating point value as the stride,
        separating it from the first two values using the stride separator
        ('x').

        The following are examples of valid FrameSpecs: 123 101:105 105:101
        101:109x2 101:110x2 101:104x0.5

        An empty string corresponds to an invalid empty time code range.

        A coding error will be issued if the given string is malformed.


        Parameters
        ----------
        frameSpec : str
        """
    @staticmethod
    def IsValid() -> bool: 
        """
        IsValid() -> bool


        Return true if this range contains one or more time codes, or false
        otherwise.
        """
    @staticmethod
    def empty() -> bool: 
        """
        empty() -> bool


        Return true if this range contains no time codes, or false otherwise.
        """
    @property
    def endTimeCode(self) -> None:
        """
        type : TimeCode


        Return the end time code of this range.

        :type: None
        """
    @property
    def frameSpec(self) -> None:
        """
        :type: None
        """
    @property
    def startTimeCode(self) -> None:
        """
        type : TimeCode


        Return the start time code of this range.

        :type: None
        """
    @property
    def stride(self) -> None:
        """
        type : float


        Return the stride value of this range.

        :type: None
        """
    __instance_size__ = 40
    pass
class UsdStageStatsKeys(Boost.Python.instance):
    activePrimCount = 'activePrimCount'
    approxMemoryInMb = 'approxMemoryInMb'
    assetCount = 'assetCount'
    inactivePrimCount = 'inactivePrimCount'
    instanceCount = 'instanceCount'
    instancedModelCount = 'instancedModelCount'
    modelCount = 'modelCount'
    primCounts = 'primCounts'
    primCountsByType = 'primCountsByType'
    primary = 'primary'
    prototypeCount = 'prototypeCount'
    prototypes = 'prototypes'
    pureOverCount = 'pureOverCount'
    totalInstanceCount = 'totalInstanceCount'
    totalPrimCount = 'totalPrimCount'
    untyped = 'untyped'
    usedLayerCount = 'usedLayerCount'
    pass
def AuthorCollection(*args, **kwargs) -> None:
    pass
def ComputeAllDependencies(*args, **kwargs) -> None:
    pass
def ComputeCollectionIncludesAndExcludes(*args, **kwargs) -> None:
    pass
def ComputeUsdStageStats(*args, **kwargs) -> None:
    pass
def CopyLayerMetadata(*args, **kwargs) -> None:
    pass
def CreateCollections(*args, **kwargs) -> None:
    pass
def CreateNewARKitUsdzPackage(*args, **kwargs) -> None:
    pass
def CreateNewUsdzPackage(*args, **kwargs) -> None:
    pass
def ExtractExternalReferences(*args, **kwargs) -> None:
    pass
def FlattenLayerStack(*args, **kwargs) -> None:
    pass
def FlattenLayerStackResolveAssetPath(*args, **kwargs) -> None:
    pass
def GenerateClipManifestName(*args, **kwargs) -> None:
    pass
def GenerateClipTopologyName(*args, **kwargs) -> None:
    pass
def GetAlphaAttributeNameForColor(*args, **kwargs) -> None:
    pass
def GetDirtyLayers(*args, **kwargs) -> None:
    pass
def GetMaterialsScopeName(*args, **kwargs) -> None:
    pass
def GetModelNameFromRootLayer(*args, **kwargs) -> None:
    pass
def GetPrefName(*args, **kwargs) -> None:
    pass
def GetPrimAtPathWithForwarding(*args, **kwargs) -> None:
    pass
def GetPrimaryCameraName(*args, **kwargs) -> None:
    pass
def GetPrimaryUVSetName(*args, **kwargs) -> None:
    pass
def GetRegisteredVariantSets(*args, **kwargs) -> None:
    pass
def ModifyAssetPaths(*args, **kwargs) -> None:
    pass
def StitchClips(*args, **kwargs) -> None:
    pass
def StitchClipsManifest(*args, **kwargs) -> None:
    pass
def StitchClipsTemplate(*args, **kwargs) -> None:
    pass
def StitchClipsTopology(*args, **kwargs) -> None:
    pass
def StitchInfo(*args, **kwargs) -> None:
    pass
def StitchLayers(*args, **kwargs) -> None:
    pass
def UninstancePrimAtPath(*args, **kwargs) -> None:
    pass
__MFB_FULL_PACKAGE_NAME = 'usdUtils'
