Skip to content

v26.5.2-beta.2 | OpenUSDKit

Pre-release
Pre-release

Choose a tag to compare

@furbytm furbytm released this 02 Jul 21:04
56a294b

SwiftUSD v26.5.2-beta.2

OpenUSDKit & apple/SwiftUsd integration

Changelog

Changes in v26.5.2-beta.2

  • Adds the availability of some OpenExec types to Swift:
    import OpenUSDKit
    
    let stage = UsdStage.createInMemory()
    let system = ExecUsdSystem.create(stage: stage)
    
    UsdGeom.Xform.define(stage, path: "/hello")
    let prim = UsdGeom.Sphere.define(stage, path: "/hello/world")
    
    let key = Pixar.ExecUsdValueKey(prim, .init("computeLocalToWorldTransform"))
    let request = system.BuildRequest(consuming: [key])
    let view = system.Compute(request)
    
    var val = view.Get(0)
    if val.IsHolding(T: pxr.GfMatrix4d.self) {
      let matrix: pxr.GfMatrix4d = val.UncheckedGet()
    }
  • Adds the latest changes from upstream PixarAnimationStudios/OpenUSD's dev branch, up to commit 3e38900 (the latest revision at the time of writing).

Rolling Changes Since v26.5.2-beta.1

  • Featuring OpenUSDKit - a unified cross-platform Swift API for OpenUSD, this is a direct replacement for the PixarUSD target.
  • Integrates apple/SwiftUsd within OpenUSDKit and brings precompiled binaries for Darwin platforms by default, use the environment variable SWIFTUSD_BUILD_FROM_SOURCE=1 if you prefer to build from source and match the behavior on all other platforms (Android, Linux, and Microsoft Windows).
  • Note: some work still needs to be done to clean up some API differences between the two compilation contexts, which is why this is a pre-release.

🎧 now playing
listen to pennine by JJerome87, alt-J.


Thank you


Usage

To use this release of USD in your swift project, add the following to the dependencies section in your Package.swift file:

// swift-tools-version: 6.1

dependencies: [
  .package(url: "https://github.com/wabiverse/swift-usd.git", from: "26.5.2-beta.2")
]


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.

Dependency CentOS Ubuntu
BZ2 bzip2-devel libbz2-dev
ZLib zlib-devel zlib1g-dev
FreeGLUT freeglut-devel freeglut3-dev
DEFLATE libdeflate-devel libdeflate-dev
Expat libexpat-devel libexpat1-dev
Xcursor libXcursor-devel libxcursor-dev
Xt libXt-devel libxt-dev
Xi libXi-devel libxi-dev
Xinerama libXinerama-devel libxinerama-dev
Xrandr libXrandr-devel libxrandr-dev