Remove modelfiledir_ from compiled assets, use owning spec modelfiledir instead.

Previously specs that were attached to some parent spec would resolve its asset paths relative to the modelfiledir of the parent spec. This means path resolution would change depending on the source of the parent spec. Instead, this change makes asset file path resolution relative to the "owning spec" i.e. the spec where the asset was created.

This enables workflows such as loading a parent spec via resource provider, then loading a child spec via `from_zip` or in memory providing `spec.assets` and resolution will work as intended.

PiperOrigin-RevId: 903207910
Change-Id: Ia58020ab372a3ceadf31e804d145e2ae53d8e5f9
This commit is contained in:
Sam Haves
2026-04-21 06:59:17 -07:00
committed by Copybara-Service
parent 3325971840
commit da01bd37a2
5 changed files with 114 additions and 44 deletions
+7
View File
@@ -23,6 +23,13 @@ General
**Migration:** The flag :ref:`multiccd<option-flag-multiccd>` must be explicitly disabled.
Bug fixes
^^^^^^^^^
- Asset paths in attached child specs are now resolved relative to the model file directory of the child spec, rather
than the parent spec. This prevents the origin of the parent spec to affect the resolution of asset paths in the child
spec.
Version 3.7.0 (April 14, 2026)
------------------------------