v24.8.21 | Android & ARC #33
furbytm
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's New
🎧swift on.
SwiftUSD v24.8.21
Experimental Android Support, ARC-Managed Lifetimes, & Safer Swift OpenUSD API.
Changelog
Commits
Changes
UsdStagedirectly instead ofUsdStageRefPtr; dereferencing and lifetime management are handled internally.std::string↔Stringconversions and ambiguousXformableoperation overloads that previously caused Swift compiler crashes on Linux.Breaking
UsdStage.createNew(),UsdStage.open(), andUsdStage.createInMemory()now returnUsdStagedirectly with proper ARC-managed lifetimes, client code should now holdUsdStagedirectly instead ofUsdStageRefPtr; dereferencing and lifetime management are handled internally.HgiGL.createHgi(),HgiMetal.createHgi(), andUsdImagingGL.Engine.createEngine(...)now return the types directly with proper ARC-managed lifetimes, instead of ashared_ptr-backed...Ptr/...SharedPtrwrapper. TheHgiGLPtr,HgiMetalPtr, andUsdImagingGLEngineSharedPtr/EngineSharedPtrtypealiases are removed.Fixed
UsdStageandSdfLayerinstances held by Swift now have correct reference-counted lifetimes. Their retain/release hooks were previously no-op stubs, so Swift's ARC calls didn't actually affect the underlying object's refcount; they now go through apple/SwiftUsd'sTf_RetainReleaseHelperand properly participate inTfRefBaserefcounting.HgiGL,HgiMetal, andUsdImagingGLEngineare now reference-counted Swift types (they now go through our ownTf_SharedPtrRetainReleaseHelperand properly participate in refcounting) - Swift automatically releases them when no longer referenced, so manual lifetime workarounds are no longer needed.Thank you
Usage
To use this release of Pixar's USD in your swift project, add the following to the dependencies section in your Package.swift file:
Linux
For Linux, these are the only dependencies required, as MetaverseKit provides everything else.
Tip
If you are on a distro like Ubuntu there is a good chance you already have most of these installed.
This discussion was created from the release v24.8.21 | Android & ARC.
Beta Was this translation helpful? Give feedback.
All reactions