Skip to main content

Module path_expr

Module path_expr 

Source
Expand description

Path expressions (C++ SdfPathExpression): a set-algebra over path patterns and collection references, the value type behind pattern-based collection membership.

An expression combines PathPattern atoms and ExpressionReference atoms with + (union), & (intersection), - (difference), ~ (complement), and whitespace (implied union), as in /World//Robot* + %/Sets:big - //{isa:Camera}. Expressions compose across opinion strength through the special weaker reference %_, which PathExpression::compose_over substitutes with the next-weaker expression.

Parsing never fails a caller: a malformed string becomes the empty expression carrying parse_error, which keeps it distinguishable from a genuinely empty one. This module owns the data model and its algebra; matching is PathExpressionEval’s job, after references are resolved and paths anchored.

Structs§

Component
One match component past the prefix.
EvalError
A path expression that cannot be compiled into an evaluator: incomplete (unresolved references or unanchored relative paths), or naming a predicate function the library does not register.
ExpressionReference
A reference to another expression (C++ SdfPathExpression::ExpressionReference).
FnArg
One call argument: positional when name is None, keyword otherwise.
FnCall
One predicate function invocation.
GlobPattern
A compiled glob pattern matched against a whole component name.
IncrementalSearcher
A stateful depth-first searcher over one expression (C++ SdfPathExpressionEval::IncrementalSearcher), created by PathExpressionEval::incremental_searcher.
PathExpression
A parsed path expression; see the module docs for the syntax.
PathExpressionEval
A compiled path expression over predicate domain D (C++ SdfPathExpressionEval).
PathPattern
A single pattern matching scene paths: a literal Path prefix followed by match components — literal names, glob components (*, ?, [...]), // stretches (arbitrary levels of hierarchy), embedded {predicate} expressions, and at most one trailing property element.
PredResult
A predicate function’s answer for one domain object, carrying whether the answer is known to hold for every descendant of that object (C++ SdfPredicateFunctionResult).
PredicateExpression
A logical expression of named predicate functions, as written between { and } in a path pattern ({isa:Imageable and not abstract}).
PredicateLibrary
The predicate functions available to a path expression over domain D (C++ SdfPredicateLibrary).
PredicateProgram
A predicate expression linked against a library, ready to evaluate per domain object (C++ SdfPredicateProgram).

Enums§

FnCallKind
How a call was spelled, which PredicateExpression’s text reproduces.
PredicateArg
An argument value the predicate grammar can spell.
SetOp
The binary set operators, ordered tightest-binding first. All are left-associative; note - binds loosest of all.

Functions§

link_predicate_expression
Links expr against library, binding every call (C++ SdfLinkPredicateExpression). An empty expression links to an empty program, which evaluates to a constant false.

Type Aliases§

PredicateBinder
Binds one predicate name’s calls to functions: given the call’s arguments, produce the function, or None when the arguments do not bind (C++ SdfPredicateLibrary::DefineBinder).
PredicateFn
The function a predicate call binds to, evaluated per domain object.