Kind module

Summary: The Kind library provides a runtime-extensible taxonomy known as “kinds”. Useful for classifying scenegraph objects.


Python bindings for libKind

Classes:

Registry

A singleton that holds known kinds and information about them.

Tokens

class pxr.Kind.Registry

A singleton that holds known kinds and information about them. See Kind Overview for a description of why kind exists, what the builtin registered kinds are, and how to extend the core kinds.

KindRegistry Threadsafty

KindRegistry serves performance-critical clients that operate under the stl threading model, and therefore itself follows that model in order to avoid locking during HasKind() and IsA() queries.

To make this robust, KindRegistry exposes no means to mutate the registry. All extensions must be accomplished via plugInfo.json files, which are consumed once during the registry initialization (See Extending the KindRegistry)

Methods:

GetAllKinds

classmethod GetAllKinds() -> list[str]

GetBaseKind

classmethod GetBaseKind(kind) -> str

HasKind

classmethod HasKind(kind) -> bool

IsA

classmethod IsA(derivedKind, baseKind) -> bool

Attributes:

expired

True if this object has expired, False otherwise.

static GetAllKinds()

classmethod GetAllKinds() -> list[str]

Return an unordered vector of all kinds known to the registry.

static GetBaseKind()

classmethod GetBaseKind(kind) -> str

Return the base kind of the given kind.

If there is no base, the result will be an empty token. Issues a coding error if kind is unknown to the registry.

Parameters

kind (str) –

static HasKind()

classmethod HasKind(kind) -> bool

Test whether kind is known to the registry.

Parameters

kind (str) –

static IsA()

classmethod IsA(derivedKind, baseKind) -> bool

Test whether derivedKind is the same as baseKind or has it as a base kind (either directly or indirectly).

It is not required that derivedKind or baseKind be known to the registry: if they are unknown but equal, IsA will return true ; otherwise if either is unknown, we will simply return false.

Therefore this method will not raise any errors.

Parameters
  • derivedKind (str) –

  • baseKind (str) –

property expired

True if this object has expired, False otherwise.

class pxr.Kind.Tokens

Attributes:

assembly

component

group

model

subcomponent

assembly = 'assembly'
component = 'component'
group = 'group'
model = 'model'
subcomponent = 'subcomponent'