Skip to content

Unify object settings in the native spawn configuration - #1415

Closed
cvolkcvolk wants to merge 2 commits into
mainfrom
cvolkcvolk/refactor/object-config-source
Closed

cvolkcvolk wants to merge 2 commits into
mainfrom
cvolkcvolk/refactor/object-config-source

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Make Object.spawn_cfg the source of asset settings and construct each native asset configuration once. Update library objects, references, and callers to use that configuration.

Why this change?

Object keeps asset settings in several places and rebuilds its native configuration through separate factory methods. A change to scale or the USD source can leave consumers reading different values. The heterogeneous runtime needs independent member configurations that remain authoritative after construction.

What changes?

  • Copy supplied spawn configurations so instances do not share mutable settings. Expose the same configuration through spawn_cfg and object_cfg.spawn.
  • Use spawn_cfg consistently as the constructor argument; migrate native-spawner defaults and callers from spawner_cfg.
  • Build configurations directly and remove the old configuration-factory methods. Keep ObjectReference responsible for binding an existing prim.
  • Read effective scale and USD paths from native settings, including explicit YAML constructor overrides. Instance .scale and .usd_path reads reflect those values; direct writes now raise AttributeError. Change them through obj.spawn_cfg.scale and obj.spawn_cfg.usd_path.
  • Preserve library declarations. A migration TODO defers renaming their class defaults and replacing attribute forwarding with ordinary properties.

RigidObjectSet and object_sets YAML remain available. Geometry caching and the heterogeneous spawning backend follow in separate PRs, starting with #1416.

Usage example

Before:

obj = Object(name="box", object_type=ObjectType.RIGID, spawner_cfg=box_cfg)

After:

obj = Object(name="box", object_type=ObjectType.RIGID, spawn_cfg=box_cfg)
obj.spawn_cfg.visible = False

Validation

After syncing with main (2cc9e9766f): all-files pre-commit passed on this branch. At stack tip #1421, 168 CPU-compatible replay, inference, schema, and GUI tests passed (5 live-service/subprocess cases deselected). GPU simulation checks could not start because the existing container lost CUDA access.

Earlier validation:

58 tests passed: 30 configuration/scale/legacy-set checks (1 deselected) and 28 collision checks. pre-commit passed.

Review order: 1. Configuration → 2. Geometry → 3. USD preparation → 4. Export and previews → 5. Native runtime → 6. Python API → 7. YAML and authoring.

Each PR targets the preceding branch. Review and merge in order; the native backend lands in 5, followed by the Python and YAML migrations in 6–7.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@cvolkcvolk

Copy link
Copy Markdown
Collaborator Author

Superseded by #1430. Object geometry now follows object_cfg.spawn without the spawner_cfg rename, the forwarding shim or the library migration. Closing in favour of the new, smaller PR chain that starts with #1430.

@cvolkcvolk cvolkcvolk closed this Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant