Upgrading from ovstage 0.2#
This page lists what a 0.2 application must change to run on 0.3, what behaves differently without a source change, and what is new. The complete record is the [0.3] section of CHANGELOG.md for this documentation version. There are no deprecation aliases: a removed or renamed name fails immediately.
An agent can apply the mechanical changes with the update-0-2-to-0-3 skill (skills/update-0-2-to-0-3/SKILL.md).
Breaking changes#
Change |
Who is affected |
What to do |
Before / after |
|---|---|---|---|
|
Python code that calls |
Create or reuse a |
# 0.2
pd = ovstage.PathDictionary()
# 0.3
pd = ovstage.PathDictionary(stage)
|
Each instance owns its path dictionary |
C and Python code that builds a path list in one instance and uses it with another, or that outlives the instance. |
Recreate the selection in the destination instance’s dictionary. Release list references before destroying the owning instance. The |
/* 0.3: list belongs to instance_a only */
ovstage_get_path_dictionary(instance_a);
/* build a new list from instance_b's dictionary for instance_b */
ovstage_get_path_dictionary(instance_b);
|
|
Python callers that pass |
Rename the keyword. Positional calls are unaffected. The old keyword is not accepted as an alias and raises |
# 0.2
population.open_usd(stage, path, time_code=1.0)
# 0.3
population.open_usd(stage, path, time=1.0)
|
Connection writes no longer broadcast |
Code that writes a connection attribute to several prims from one |
Supply exactly one pair per target prim in a shared input tensor, or exactly one pair in each tensor of the per-prim form. Mismatched counts are rejected rather than broadcast. Submission validation reports |
# 0.2: 1 pair, N prims (broadcast)
# 0.3: N pairs, N prims (one pair per prim)
|
Untyped prim type removed |
Code that calls |
Remove the call. A USD prim with no type is still populated and carries no |
/* 0.2 */
const char* t = ovstage_population_untyped_type_name();
/* 0.3: no symbol; absence of usd-prim-type means untyped */
|
|
Code that includes |
Remove the include and calls. No release exported these symbols, so such code could not link; the exported C ABI is unchanged. |
/* 0.2 */
#include <ovstage/ovalign.h>
/* 0.3: delete the include */
|
Selector-only |
Code that reads |
Read it as raw UTF-8 bytes ( |
# 0.2: uint64 interned id
# 0.3: {uint, 8, 1} array + OVSTAGE_SEMANTIC_STRING
|
Behavior changes#
These need no source change but can alter results.
Open merges instead of clearing. Opening USD on an instance that already holds populated content writes over it and removes nothing, so opening different content yields a mixture. To replace, call
ovstage_population_reset_usd(Pythonpopulation.reset_usd) thenovstage_population_apply_usd_changesat an ordinal below the open. To empty the whole instance, use an unfiltered query with a whole-primovstage_delete_attributes.reset_usdon its own edits only the USD source. Refer to Population (USD → ovstage).``wait()`` returns the handle (Python).
Operation.wait()returns theOperation, and thewait()methods ofQuery,Read,Map,OrdinalQuery, andHierarchyreturn the handle they were called on, instead ofNone. Code that useswait()as a statement is unaffected;group = read.wait().fetch_next()now works. Errors still raiseOvstageError.Stale or foreign operation ids.
ovstage_population_wait_opandovstage_population_export_wait_opreturnOVSTAGE_ERROR_INVALID_HANDLE(previouslyOVSTAGE_ERROR_INVALID_ARGUMENT) for an id that does not belong to the instance’s current operation stream. The export wait also returns it for an id already consumed by an earlier terminal wait.Unknown configuration keys.
ovstage_initializerejects keys it does not recognize; earlier builds ignored them.Query refresh failure. A failed query refresh after structural changes no longer terminates the process. Recreate all ready query handles on the stage.
Every populated prim has ``usd-schemas``. A prim with no applied schema carries an empty set, so
HASonusd-schemasmatches every populated prim. Select by schema withCONTAINS.RENDERING-domain prims carry it only when they have applied schemas.``apply_usd_time`` always rewrites in-scope time-sampled properties, even when the time is unchanged.
apply_usd_timeandapply_usd_changeson one instance must not share an ordinal unless their attributes are disjoint.Clone.
ovstage_clonerejects a repeated, empty, or unparseable target path at enqueue withOVSTAGE_ERROR_INVALID_ARGUMENTand lists all already-existing targets in itsOVSTAGE_ERROR_PRIM_NOT_FOUNDstring. Clone and delete advance the attribute’s latest ordinal. Refer to Cloning Subtrees.Instance cleanup with an attached renderer. Destroying the application’s stage handle does not detach an attached ovrtx renderer. Use the renderer’s public detach or destruction API to end the attachment. The destroyed stage handle is invalid; do not use it for calls or views. Follow the stage cleanup sequence.
Failed writes keep completed entries. When an entry in a batch fails after earlier entries completed, the completed entries remain applied. Repair the update and check its completion before advancing the watermark. Recoverable allocation failures report errors; a failure that prevents the runtime from keeping already-applied data consistent still terminates the process. See Recovering from a Failed Write for recovery and the fatal-failure exception.
Bookkeeping prims. A stage populated without the
RENDERINGdomain no longer carries the two prims the runtime kept for its own bookkeeping, so an unfiltered query counts two fewer prims than in 0.2.Maps (Python). A fetched
MapGroupkeeps its owningMap, and using group tensors after an acceptedunmap_groupraises.unmap_groupchecksLAYOUT_CHANGEDagainst the map’s own prims only.Returned tensors carry explicit compact
stridesinstead ofNULL.
New in 0.3#
ovstage_get_build_info/ovstage.get_build_info()andBuildInfo: build string, revision, and location, available before runtime initialization. Refer to Python API Reference.ovstage_get_config/Stage.config(StageConfig): read back the process configuration an instance captured. Refer to Set Up a Python Project.OVSTAGE_POPULATION_DEFAULT_TIMEandovstage_population_is_default_time(Pythonpopulation.DEFAULT_TIMEandis_default_time): name USD’s default time code, a NaN, so test it withis_default_time, never==. Refer to Population (USD → ovstage).Clone results:
ovstage_fetch_clone_resultandovstage_clone_result_t; PythonStage.clone_async()returns aCloneOperationwhoseresult()returns aCloneResult, andStage.clone()returns thatCloneResultinstead ofNone. Refer to Cloning Subtrees.Export to an in-memory layer or stage by identifier:
ovstage_population_export_to_usd_layer_identifier,ovstage_population_export_to_usd_stage_identifierand theirenqueueforms; Pythonpopulation.export_to_usd_layer,export_to_usd_stage,export_typed_hierarchy_to_usd_layerand_asyncforms. The host that owns the USD layer or stage controls persistence. Refer to Exporting ovstage to USD.usd-ancestor-types: population records the alias names of every type a populated prim derives from, excluding its own type. Population also records the bare name of each multiple-apply schema inusd-schemas. Refer to Queries and Reading Attributes.Connection attributes can be read and deleted. CPU reads return
(target path id, target attribute token id)pairs; GPU reads reportOVSTAGE_ERROR_NOT_SUPPORTED. Refer to Reading Attributes.Python
ReadGroup.semantic: the authored attribute semantic of a read group, asAttributeSemanticor a raw integer for values the installed enum does not name. Refer to Python API Reference.
Checklist#
Search the application for these patterns before building against 0.3.
Pattern |
Action |
|---|---|
|
Pass a |
|
Rename to |
|
Remove; test for a missing |
|
Remove the include and calls. |
|
Recreate lists per instance; release before destroy. |
|
Decide whether to merge; otherwise |
connection writes (a connection attribute written to more than one prim) |
One pair per target prim. |
|
Handle |
|
Read UTF-8 bytes with |
|
Use |
|
Use |
unfiltered prim-count assertions on non- |
Expect two fewer prims. |
|
Remove unknown keys. |