ovstage Integration#
ovclash normally opens a USD stage file itself. An application that already owns a live ovstage Stage, such as a viewer or an editor, can lend that Stage to a clash context or a Suite API runtime instead, as an attached stage. ovclash then reads the Stage’s Default-time evaluation, the Stage evaluated at USD’s Default time code, which holds the values authored without time samples, as its owner populated it. Other times come from the owner, through a callback, or from ovclash itself: when the owner also describes how it composed the Stage, ovclash evaluates those times in private populations, ovstage instances of its own that it populates from the same sources, and never moves the owner’s Stage.
This page covers both halves of that arrangement:
the owner-operation gate, which every process that creates its own ovstage Stage next to clash contexts uses, with or without an attachment;
attaching a Stage: the binding descriptor, the two ways to evaluate time and the owner’s duties while clash operations use the Stage.
Everything here is an optional extension of the ovstage backend. Released wheels and SDK archives are ovstage builds; the unpublished reference build, which reads USD through OpenUSD instead, exports none of these symbols. Threading and Ownership has the general handle and lifetime rules.
The API at a glance#
For each task, the table names the C call on the canonical API, the C call on the Suite API and the Python call:
Task |
C, canonical ( |
C, Suite ( |
Python |
|---|---|---|---|
Run owner work under the gate |
|
|
|
Borrow a Stage |
|
|
|
Stop borrowing it |
|
|
|
Select the matrix decomposition |
|
None |
|
C/C++ Quickstart shows how to build against these headers, and C API Conventions gives the status and string rules they follow.
Check the backend first#
Only the ovstage build of the library exports the ovclash_ovstage_* functions and the three
functions of <ovclash_suite/ovclash_suite_ovstage.h>. A C program that loads the library at
run time checks the backend before it resolves them. ovclash_get_backend_info() needs no
context and is safe to call concurrently;
Overview lists the four fields and the values that
the released library reports. Add this function to the C source that loads the library, and call
it before you resolve any ovclash_ovstage_* symbol.
#include <ovclash/ovclash.h>
#include <stdio.h>
#include <string.h>
/* Returns 1 for the ovstage build, which also exports the optional ovclash_ovstage_* symbols. */
static int is_ovstage_backend(void)
{
ovclash_backend_info_t info;
if (ovclash_get_backend_info(&info).status != OVCLASH_STATUS_SUCCESS)
{
return 0;
}
printf("backend: %.*s\n", (int)info.backend_name.length, info.backend_name.ptr);
return info.backend_name.length == 7 && memcmp(info.backend_name.ptr, "ovstage", 7) == 0;
}
backend_name borrows a static, library-owned string; never free it. The call fails for a null
pointer and, on ovstage, inside an owner operation.
In Python, ovclash.backend_info().backend_name and ovclash_suite.backend_info().backend_name
report "ovstage". The Python methods on this page raise RuntimeError when the loaded library
lacks the extension.
The owner-operation gate#
The ovstage backend serializes Stage creation, population, time evaluation and destruction across the whole process with one gate, the owner-operation gate. An application that owns its own ovstage Stage in a process that also has clash contexts runs that Stage work under the same gate, through one of the calls in The API at a glance.
Route this work through the gate:
Stage creation and destruction;
population and source edits;
inspection composition;
the renderer lifecycle: attach, step and detach.
The rules:
Lock order. Acquire the gate before any owner-local lock. An attached
evaluate_timecallback already holds it.Synchronous and borrowed. The callback runs on the calling thread before the call returns. ovclash never retains the callback or its user data.
Nesting. Owner operations nest on one thread, up to 64 levels deep. Owner operations on different threads are serialized.
No reentry. Inside an owner operation, every guarded canonical entry point fails, destruction included, and so does every Suite function that returns
ovclash_suite_result_t, even one that touches no runtime: data stores, models, export and utility helpers. The error text readsclash runtime reentry from an ovstage owner operation is prohibited.What still works inside. Nested owner operations; the Suite last-error getters;
ovclash_get_settings()andovclash_get_last_error(); and the canonical version, result-string, DLPack tensor-view andovclash_reset_*helpers.ovclash_get_backend_info()andovclash_suite_get_backend_info()fail.The gate is not a handle lock. It does not serialize calls on a clash context or runtime. Data-plane reads, which read the populated data of the ovstage Stage instance itself rather than its USD layers, and collision work do not take it.
In C, the callback returns 1 for success and any other value for failure, and it must not
throw. The call succeeds when the callback returns 1. It fails for a null callback, a callback
failure, excessive nesting or a native exception, and it releases the gate on every exit.
Diagnostics of a failing callback remain the caller’s responsibility.
Add these two functions to the C source of the application that owns the Stage, and call
run_owner_work() wherever that application creates, populates or destroys its Stage.
#include <ovclash/ovclash_ovstage.h>
typedef struct owner_state_t
{
int rebuilds;
} owner_state_t;
/* Runs under the owner-operation gate. This example counts its runs; your callback makes the
* ovstage calls that create, populate or destroy the application's own Stage instead.
* It must not throw and must not call into a clash context or runtime. */
static int32_t rebuild_owner_stage(void* user_data)
{
owner_state_t* state = (owner_state_t*)user_data;
state->rebuilds += 1;
return 1; /* 1 is success; any other value is a failure */
}
static int run_owner_work(owner_state_t* state)
{
ovclash_result_t result = ovclash_ovstage_run_owner_operation(rebuild_owner_stage, state);
return result.status == OVCLASH_STATUS_SUCCESS;
}
The gate in Python#
ovclash_suite.run_ovstage_owner_operation(operation, /, *args, **kwargs) calls
operation(*args, **kwargs) under the gate. The gate is process-wide, so the same call also
covers ovclash.ClashRuntime objects.
It returns the value of
operationafter it releases the gate.An exception that
operationraises is re-raised with its original traceback, after the gate is released.It raises
TypeErrorwhenoperationis not callable, andRuntimeErrorwhen the library lacks the extension, when more than 64 operations nest, or when the native gate fails.Inside the operation, the runtime wrappers of both packages raise
RuntimeErrorbefore they change any Python state. Every other Suite call that reaches the native library fails too,ClashQueryand the other model helpers, data stores and exports included.
Close clash wrappers explicitly with destroy() or close(). A wrapper that Python
garbage-collects inside an owner operation cannot release its native handle there. ovclash then
keeps that wrapper, with its attachments and callbacks, until the ovclash-owner-finalizer
thread has waited for the gate and run the cleanup outside it.
Note The gate also configures the reconnect window of the omni client, the client library through which the ovstage runtime reaches
omniverse://hosts. The first successful client discovery, through ovstage instance creation or this gate, readsOVCLASH_OMNI_CLIENT_RETRY_MAX_MSonce per process; the policy also affects other users of that process-wide client. Environment variables describes the variable.
Attaching a Stage#
An attachment lends an already populated Stage to one context or runtime. ovclash never writes to the Stage, never evaluates it on its own and never destroys it. Several contexts may borrow the same Stage.
Default-time selection always reads the borrowed Stage. Finite times, such as the sample times of a dynamic query or the time of a static query, come from one of two sources:
Attachment |
Binding |
Finite times |
|---|---|---|
Owner-evaluated |
No composition |
The owner publishes each time on its Stage, through the |
Engine-evaluated |
A composition |
ovclash replays the owner’s composition into private ovstage populations and evaluates every finite time there. It never calls back into the owner and never advances the Stage; see Engine-evaluated time. |
The binding descriptor#
ovclash_ovstage_binding_t carries the Stage and the metadata that the owner has resolved.
Zero-initialize it, then set its fields and struct_size. The attach call copies the descriptor
and borrows the Stage it names.
The descriptor names an evaluation of the Stage by its ordinal, ovstage’s sequence number of one sealed evaluation. The owner writes an evaluation at an ordinal and advances the Stage’s global write floor to it, which commits every ordinal up to the floor for reading; the Stage retains a window of recent ordinals, and an ordinal older than that window is no longer retained.
Field |
C type |
Required |
Default or values |
Meaning and rules |
|---|---|---|---|---|
|
|
Yes |
|
Two shorter sizes are also accepted: the size that ends right before |
|
|
Yes |
The live Stage |
Its instance bundle and version-query slot must be valid, and it must report the ovstage API major and minor version of the pinned |
|
|
Yes |
Positive |
The read ordinal of the Stage’s current evaluation. It must be retained and covered by the global write floor. With a composition, it must stay retained until the attachment ends. |
|
|
Yes |
Finite, or NaN for Default |
The time of that evaluation, in seconds. Reads at this time use |
|
|
Yes |
Finite and positive |
The length of one stage unit, in meters. With a composition, it must equal the value that the composition resolves. |
|
|
Yes |
Finite |
The timeline endpoints, in time codes. |
|
|
Yes |
Finite and positive |
The stage’s rates. With a composition, |
|
|
No |
Null |
The time-evaluation callback; see Time evaluation. Must be null with a composition. |
|
|
No |
Null |
Passed to |
|
|
No |
|
See Authored transform updates. Unknown bits are rejected, and a nonzero value requires |
|
|
No |
Null |
Null keeps the attachment owner-evaluated; a composition makes it engine-evaluated. See Engine-evaluated time. |
ovclash_get_stage_timeline_data() and the Suite timeline getters report the four timeline
fields of the binding. A minimal owner-evaluated C attachment of a Stage that holds its
Default-time evaluation follows. Add the function to the owner’s C source, and call it with a
context from ovclash_create_context() after the owner has populated the Stage and committed
ordinal, in place of ovclash_open_stage():
#include <ovclash/ovclash_ovstage.h>
#include <math.h>
#include <string.h>
/* Lends the owner's populated Stage, sealed at `ordinal`, to one context. The metadata values
* stand for the ones the owner resolved for its Stage. */
static int attach_owner_stage(ovclash_context_t* ctx, ovstage_instance_t* stage, uint64_t ordinal)
{
ovclash_ovstage_binding_t binding;
memset(&binding, 0, sizeof(binding));
binding.struct_size = sizeof(binding);
binding.stage = stage;
binding.committed_ordinal = ordinal;
binding.time_seconds = NAN; /* the Stage holds its Default-time evaluation */
binding.meters_per_unit = 0.01;
binding.start_time_code = 0.0;
binding.end_time_code = 0.0;
binding.time_codes_per_second = 24.0;
binding.frames_per_second = 24.0;
/* evaluate_time, user_data, capabilities and composition stay zero */
return ovclash_ovstage_attach_stage(ctx, &binding).status == OVCLASH_STATUS_SUCCESS;
}
In Python, attach_ovstage(stage, committed_ordinal, **metadata) takes a live ovstage.Stage
and fills the descriptor itself. The keyword arguments match the C fields,
authored_transform_updates sets capabilities, and the three composition_* keywords fill the
composition:
Argument |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
Yes, positional |
None |
The live Stage to borrow. |
|
|
Yes, positional |
None |
A positive unsigned 64-bit ordinal; C field |
|
|
No |
NaN, the Default time |
C field |
|
|
No |
|
C field |
|
|
No |
|
C fields of the same names. |
|
|
No |
|
C fields of the same names. |
|
Callable that takes the time in seconds and returns the new ordinal as an |
No |
|
C field |
|
|
No |
|
|
|
|
No |
|
The exact path, URL or USDA text that the owner opened the Stage from. USDA is USD’s text format. |
|
Sequence of |
No |
|
The USDA texts of the owner’s root merges, earliest first. |
|
|
No |
|
|
It raises TypeError when stage is not a live ovstage.Stage, an argument has the wrong type
or a keyword is unknown. composition_root must be a str or path-like object, and a str with
composition_root_is_usda; composition_layers must be an ordered sequence that holds only str,
not a str itself and not a set, whose iteration order would decide the layer strength. It raises
ValueError when:
committed_ordinalis not a positive unsigned 64-bit integer;authored_transform_updatesis set withoutevaluate_time;composition_layersorcomposition_root_is_usdais given withoutcomposition_root;the root or a layer is empty or contains NUL;
composition_rootis combined withevaluate_time, withauthored_transform_updates=Trueor with atime_secondsother than NaN.
It raises RuntimeError when the extension is missing, an async handle, the handle of an
async pipeline, is alive or the native attachment fails. The runtime
keeps the encoded composition until the attachment ends, and passes a path-like root through
os.fspath() without resolving it. Open the Stage from an absolute path or a URL and pass that
string; Engine-evaluated time gives the reason.
What an attachment changes#
Scope and error text. A successful attachment, first or replacement, clears the scope, and on the canonical API the last error. Set the scope after you attach.
Results. A replacement attachment invalidates geometry, results and pipelines. In Python,
ClashRuntime.attach_ovstage()also closes open overlap reports.Full-scene traversal. A non-empty scope turns the engine’s full-scene traversal off.
Canonical: attaching does not turn it back on, as
ovclash_open_stage()does not. Set a scope after attaching, or callovclash_set_full_scene(context, true)for an unscoped run. Otherwise the run selects nothing.Suite: a successful attachment turns it back on when the run settings in effect enable
enable_full_scene. Those are the settings last applied withovclash_suite_set_run_settings()or, before any apply, the defaults, which enable it.
Active work. Attaching is rejected while an async handle is alive, including a completed handle that is not yet released. The Suite API also rejects a live fetch, a fetch-and-save operation that has begun and is not yet destroyed.
Failure. A failed attachment keeps the previous attachment and scope.
ovclash reads the Stage as its owner populated it. For example,
subcomponent filtering needs the composed kind values, the
USD prim metadata that marks a prim as a subcomponent: when the owner’s population holds none,
every mesh resolves to the empty root, and enabling the filter drops every pair. An
engine-evaluated attachment reads kinds from the Stage too, not from its private populations.
Ending an attachment#
None of these calls destroys the Stage:
Surface |
Calls that end the attachment |
|---|---|
C, canonical |
|
C, Suite |
|
Python, |
|
Python, |
|
Ending an engine-evaluated attachment also destroys its private populations and drops its composition.
ovclash_release_memory()keeps the attachment, with its composition. It destroys the private populations of an engine-evaluated attachment, and the next finite-time read replays the composition again, unless a detected units or rate mismatch already fails it.Detaching invalidates results and pipelines, and
ovclash_ovstage_detach_stage()also clears the last error. Detaching is rejected while an async handle, or on the Suite API a fetch, is alive.ovclash_ovstage_detach_stage()on a context without an attachment also succeeds. It still clears the results and forgets a stage opened withovclash_open_stage().An attached Stage has no stored path. After a reset, attach it again before the next run.
Time evaluation#
An owner-evaluated attachment, one without a composition, reads every time from the Stage.
evaluate_time(user_data, seconds, &ordinal, &error) asks the owner to evaluate the Stage at a
time in seconds. NaN means the Default time. ovclash never calls it for an attachment with a
composition.
Success. Before it returns
1, the callback publishes the complete sampled canonical local transforms and reset-stack opinions, theresetXformStackflags that stop a prim from inheriting its parent’s transform. That includes invisible instance placements, the transforms of hidden instances, and prototype operands, the prims inside the prototypes that instances share. The callback then seals a new ordinal. It writes that ordinal toordinal. Each new ordinal must be greater than the previous one and fit the ordinal type of the ovstage implementation.Failure. Any other return value, conventionally
0, fails the evaluation. The callback may seterrorto a UTF-8 diagnostic, which must stay valid until the enclosing ovclash call returns. That text becomes the clash error.Thread. The callback runs on the pipeline thread, which can be a native worker. It runs as an owner operation: the thread already holds the gate, nested owner operations are allowed, and owner locks come after the gate. It must not throw or enter a clash runtime. It must never wait for another thread that takes the gate, because that deadlocks.
Serialization. One context invokes its callback serially. The owner serializes callbacks and every external use of a Stage that several contexts share.
Without a callback, only the evaluation in the descriptor is available. A read at
time_seconds, and a Default-time selection, use that frozen snapshot. Any other time fails, so
a dynamic query on such an attachment needs evaluate_time.
In Python, evaluate_time(seconds) returns the new ordinal as an int. An exception it raises,
or an ordinal that is not a positive unsigned 64-bit integer, fails the evaluation with the
exception text as the error.
Engine-evaluated time#
A composition tells ovclash how the owner built its Stage’s USD source, so that ovclash can
evaluate time itself. A dynamic query then never republishes the owner’s Stage and never
moves the time that the owner renders. Set composition in the binding to an
ovclash_ovstage_composition_t, or pass the composition_* keywords in Python. The attach call
copies the composition and every string it names.
Field |
C type |
Required |
Default or values |
Meaning and rules |
|---|---|---|---|---|
|
|
Yes |
|
Any other value is rejected. |
|
|
Yes |
Non-empty UTF-8 |
The exact string that the owner opened its USD source from: the path or |
|
|
Yes |
|
|
|
|
Yes |
|
The number of entries in |
|
|
When |
Null when |
The USDA texts of the owner’s surviving |
root and every layer are non-empty UTF-8 without an embedded NUL. The binding must also set
time_seconds to NaN, because the Stage holds its Default-time evaluation at
committed_ordinal, and leave evaluate_time null and capabilities zero, so no owner callback
ever runs. Attaching fails otherwise.
Each read has one source:
Read |
Source |
|---|---|
Default selection, mesh geometry, visibility and subcomponent kinds |
The Stage at |
Immediate depth and depenetration queries, and matrix queries at the Default time |
The Stage at |
Units and the timeline |
The binding |
Transforms at every sample time, and at the time of a static query |
A private population of the composition |
Static and dynamic classification, which enables static-pair pruning: the purge of permanent static overlaps, which drops pairs of two transform-static meshes |
A private population of the composition |
Matrix prefetch, and matrix queries at finite time codes |
A private population of the composition |
How ovclash replays a composition:
It makes the same population calls with the same strings in the same order, into ovstage instances of its own: it opens the root, merges each layer at
/, and then populates only what it reads. The strength order of the layers, where a later merge is stronger, and the anchoring of the inline layers therefore follow the owner’s.It replays under the owner-operation gate, first at the first finite-time read. A classification population lasts for one classification. The transform population lasts until the attachment ends or
ovclash_release_memory(); a read at an earlier time than the last one replays it again, as a file-backed stage reopens its file.At the first finite-time read it compares the composed
metersPerUnitandtimeCodesPerSecondwith the binding. When the stage reports a rate of 24 together with anotherframesPerSecond, an authored 24 and an absent rate look alike. Either value is then accepted for sampling, which works in seconds, and the first matrix query by time code first resolves the rate from the root alone.A composition that ovstage cannot replay, or metadata that differs from the binding, fails that first finite-time read with one of the texts in Messages. Attaching does not open the root.
A detected
metersPerUnitortimeCodesPerSecondmismatch fails every later finite-time read and classification on that attachment with the same message, without replaying again, also afterovclash_release_memory(), until the next attach. Once a matrix query by time code disproves an ambiguous rate, later sampling reads and classifications fail too. A replay failure that ovstage reports is not remembered, and the next finite-time read replays again.
The owner’s contract:
At every finite time, the canonical local transforms and reset-stack opinions of the Stage equal those of a fresh population of the composition. ovclash cannot verify this. A stale or missing layer gives wrong finite-time poses without an error; a structural difference, such as an instance root that only one of the two makes instanceable, fails the run.
A transform that the owner writes only into the data plane, outside its USD layers, is therefore seen by Default selection and by no finite-time read. A composition cannot express references at other target paths or file references either. An owner that relies on any of them at finite times attaches without a composition and evaluates time itself.
The root file and every file that the root or a layer references stay unchanged on disk until the attachment ends. ovclash reopens the root by its string at every replay, including the first finite-time read, the next finite-time read after a failed replay, the first one after
ovclash_release_memory(), a read at an earlier time than the last one, each classification and, for an ambiguous rate, the first matrix query by time code. After a changed file is saved, Default selection still reads the Stage, but finite-time poses and the static and dynamic classification come from the new file: wrong poses without an error, or a failed run. A relative root resolves against the process working directory at each replay, so open the Stage from an absolute path or a URL and pass that string.committed_ordinalstays retained until the attachment ends. ovclash reads the Stage there again afterovclash_release_memory().The owner never holds the owner-operation gate while it waits for a clash call, because ovclash takes the gate to replay the composition.
An engine-evaluated attachment in C, for a Stage that the owner opened from a file and then
merged one layer into, follows. Add the function to the owner’s C source, and call it with a
context from ovclash_create_context() after the owner has committed ordinal, in place of
ovclash_open_stage():
#include <ovclash/ovclash_ovstage.h>
#include <math.h>
#include <string.h>
/* The owner opened `path`, an absolute path or a URL, at the Default time, merged `layer_text`
* at "/" and sealed `ordinal`. ovclash evaluates every finite time itself and never calls back
* into the owner. The root file and every file that the root or a layer references stay
* unchanged until the attachment ends. */
static int attach_composed_stage(ovclash_context_t* ctx,
ovstage_instance_t* stage,
uint64_t ordinal,
const char* path,
const char* layer_text)
{
ovclash_string_t layers[1];
layers[0].ptr = layer_text;
layers[0].length = strlen(layer_text);
ovclash_ovstage_composition_t composition;
memset(&composition, 0, sizeof(composition));
composition.struct_size = sizeof(composition);
composition.root.ptr = path; /* the exact string the owner opened */
composition.root.length = strlen(path);
composition.root_kind = OVCLASH_OVSTAGE_COMPOSITION_ROOT_FILE;
composition.nb_layers = 1;
composition.layers = layers; /* earliest merge first */
ovclash_ovstage_binding_t binding;
memset(&binding, 0, sizeof(binding));
binding.struct_size = sizeof(binding);
binding.stage = stage;
binding.committed_ordinal = ordinal; /* retained until the attachment ends */
binding.time_seconds = NAN; /* required with a composition */
binding.meters_per_unit = 0.01; /* the values the composition resolves */
binding.start_time_code = 0.0;
binding.end_time_code = 48.0;
binding.time_codes_per_second = 24.0;
binding.frames_per_second = 24.0;
binding.composition = &composition; /* evaluate_time, user_data and capabilities stay zero */
/* The call copies the composition and its strings, so they may go out of scope afterwards. */
return ovclash_ovstage_attach_stage(ctx, &binding).status == OVCLASH_STATUS_SUCCESS;
}
The owner’s duties while attached#
Keep the Stage,
evaluate_timeand its user data alive until the attachment ends and every operation that uses it has finished.While clash operations use the Stage, exclude rendering, source edits, time changes and destruction. Let clash operations finish before you detach or destroy the Stage.
Serialize all calls on one context or runtime. Never reenter it from
evaluate_time.With a composition, keep
committed_ordinalretained, keep the root file and every file that the root or a layer references unchanged on disk, and keep the composition true to the Stage, as Engine-evaluated time states. Never hold the owner-operation gate while you wait for a clash call.In Python, close the clash wrappers that depend on a Stage, with
destroy()orclose(), before you destroy that Stage.
This Python example creates and populates a Stage as its owner, lends it for one static query and
destroys it again. scene.usda stands for your stage.
from pathlib import Path
import ovstage
from ovclash_suite import ClashDetection, run_ovstage_owner_operation
usda_text = Path("scene.usda").read_text(encoding="utf-8")
def create_stage():
stage = ovstage.Stage("clash-owner")
# Populate at the time the attachment declares below; ovclash trusts that declaration.
ovstage.population.open_usd_from_string(stage, usda_text, ordinal=1, time=0.0)
stage.advance_write_floor(ordinal=1).wait()
return stage
stage = run_ovstage_owner_operation(create_stage) # the owner creates and populates the stage
clash = ClashDetection()
try:
clash.attach_ovstage(stage, 1, time_seconds=0.0) # borrows the stage at ordinal 1
clash.run_pipeline()
print("overlaps:", clash.get_nb_overlaps())
finally:
clash.destroy() # ends the attachment; the stage stays alive
run_ovstage_owner_operation(stage.destroy) # the owner destroys it
The same owner can merge an edit layer on top of the file and lend the Stage with its
composition. ovclash then evaluates every finite time in its own populations of scene.usda plus
that layer, and the owner’s Stage stays at its Default-time evaluation. The owner opens the file
by its absolute path, passes that same string, and leaves the file unchanged until the attachment
ends:
from pathlib import Path
import ovstage
from ovclash_suite import ClashDetection, run_ovstage_owner_operation
# Absolute, because ovclash reopens the root by this string at each replay.
scene_path = str(Path("scene.usda").resolve())
edit_layer = """#usda 1.0
over "World"
{
over "Crate"
{
double3 xformOp:translate = (0, 0, 50)
}
}
"""
def create_stage():
stage = ovstage.Stage("clash-owner")
ovstage.population.open_usd(stage, scene_path, ordinal=1) # at the Default time
stage.advance_write_floor(ordinal=1).wait()
ovstage.population.add_usd_reference_from_string(stage, edit_layer, "/")
ovstage.population.apply_usd_changes(stage, ordinal=2)
stage.advance_write_floor(ordinal=2).wait()
return stage
stage = run_ovstage_owner_operation(create_stage)
clash = ClashDetection()
try:
clash.attach_ovstage(
stage,
2, # the Default-time evaluation with the edit layer
composition_root=scene_path, # the exact string the owner opened
composition_layers=[edit_layer], # earliest merge first
)
clash.run_pipeline()
print("overlaps:", clash.get_nb_overlaps())
finally:
clash.destroy()
run_ovstage_owner_operation(stage.destroy)
Pass the Stage’s meters_per_unit and timeline keywords as for any attachment. The first
finite-time read fails when meters_per_unit or time_codes_per_second differs from what the
composition resolves. The one exception is a root that reports a rate of 24 together with another
framesPerSecond: either value is accepted for sampling, and the first matrix query by time code
checks the rate (see Engine-evaluated time). After a detected mismatch,
every later finite-time read and classification on that attachment fails with the same message,
without replaying again, until the next attach; once a matrix query by time code disproves the
rate, later sampling reads and classifications fail too. A replay failure that ovstage reports is
not remembered, and the next finite-time read replays again.
Matrix decomposition#
On ovstage, each canonical context selects how mesh matrices are decomposed: OpenUSD-compatible math (the default) or the original ovclash math, for comparisons. The selection belongs to the context and survives a reset and a stage replacement. The Suite API has no equivalent control. Comparing ovstage matrix decompositions gives the Python and C calls and their effect on results.
Messages#
The last error, or the Python exception, of a failed integration call contains one of these texts:
Message |
Cause |
|---|---|
|
A clash call from inside an owner operation or an |
|
|
|
C: a null |
|
A null Stage, a zero or out-of-range ordinal, invalid timeline metadata or invalid capabilities. |
|
The composition is invalid, or the binding combines it with |
|
|
|
The ordinal is older than the oldest ordinal the Stage retains. |
|
The Stage comes from an ovstage implementation whose API major or minor version differs from that of the pinned |
|
The Stage’s instance bundle lacks entries that ovclash reads. |
|
A read at another time on an owner-evaluated attachment without |
|
|
|
|
|
A finite-time read of an engine-evaluated attachment could not open the composition’s root. The next finite-time read tries again. |
|
ovstage rejected the layer at that zero-based index while replaying the composition. |
|
ovstage could not populate the composed source after the merges. |
|
The composed |
|
An engine-evaluated attachment read the Stage at |
A text that starts with |
Python: a composition keyword breaks one of the rules under The binding descriptor. The exception is a |
|
Python: the loaded library is not an ovstage build. |
|
Python: the gate failed, or more than 64 owner operations nest. |
Troubleshooting covers the other consumer failures, and Zero overlaps, or a scoped run traverses the whole stage the scope behavior that What an attachment changes describes.