v23.11.24 | swift on.
What's New
🎧 swift on.
-
v23.11.24 Fixes a potential linker issue with OpenImageIO, since it was incorrectly hardcoded to only dynamically link, but we now correctly defer to SPM to automatically choose the linking strategy.
-
v23.11.23 Allows MaterialX, OpenVDB, OpenSubdiv, Ptex, OpenTimelineIO, OpenEXR, and Imath to be directly imported in Swift
import MaterialX
import OpenVDB
import OpenSubdiv
import Ptex
import OpenTimelineIO
import OpenEXR
- Provided by MetaverseKit v1.5.1.
-
v23.11.22 Allows both OpenColorIO & OpenImageIO to be directly imported in Swift
import OpenColorIO
import OpenImageIO
- Provided by MetaverseKit v1.4.4.
-
v23.11.21 Brings iOS Support
- These tasks have been completed as apart of this release.
-
v23.11.20
- Patch update to resolve errors such as these, due to a swift bug resolving type aliases to cxx namespaces:
import PixarUSD Pixar.GfVec3f(1, 2, 3) > "GfVec3f" is inaccessible due to '@_spi' protection level.
- Patch update to resolve errors such as these, due to a swift bug resolving type aliases to cxx namespaces:
-
v23.11.19 Linux Support
- Things are now currently working on Linux exactly as they do on macOS. This has been tested on Ubuntu 23.04 (Lunar Lobster), however we believe this should also work on Red Hat Enterprise Linux, CentOS, Fedora, and Oracle Linux as well, given the support for yum in MetaverseKit.
- We also made sure to include Linux support in the Pixar.Bundler, an optional convenience offered for all users to automatically
install and register all plugins with PlugRegistry, simply make a call toPixar.Bundler.shared.setup(.resources)
as apart of your application's main startup routine.
-
Featuring the metaversal epoch of the declarative api:
-
Addition of all Pixar.UsdLux schema prims, including the ability to define them from the declarative api.
-
Allow a (hopefully) seamless experience for users who run a app that depends on SwiftUSD as a dependency by auto installing all usd plugins and resources for users who call the bundler function:
Pixar.Bundler.shared.setup(.resources)
, and run the swift run command - though, our preference is for users to properly bundle their apps by adding the SwiftBundler package to their package dependencies and running the following command:// Linux swift package --disable-sandbox plugin bundler run -p linux MyApp // macOS swift package --disable-sandbox plugin bundler run -p macOS MyApp // visionOS swift package --disable-sandbox plugin bundler run -p visionOS MyApp // visionOS Simulator swift package --disable-sandbox plugin bundler run -p visionOSSimulator MyApp // iOS swift package --disable-sandbox plugin bundler run -p iOS MyApp // iOS Simulator swift package --disable-sandbox plugin bundler run -p iOSSimulator MyApp
-
v23.11.15 incidentally broke app bundles with its auto installer of all usd resources which is never intended to be run for
app bundles since they are always embedded with all their usd resources out of the box, the auto installer is only for the use
case of swift run or when the app is "unbundled" AKA the absence of an.app
directory with aContents/Resources
directory structure, this release of v23.11.16 ensures that both bundled and unbundled apps can happily find all their
required usd plugin resources. -
Resolved an additional pesky duplicate linker symbol due to swift's cxx interop seemingly ignoring hidden visibility attributes.
-
Cleanup of console & debug logging, along with various api cleanups and the ability to author schema types for declaratively defined prims.
-
Proof of Concept is officially in working order, you can now author scene description in swift without the crashing 😅.
-
Addition of a swifty Pixar.UsdShade API and the Pixar.UsdShader plugin for shaders such as UsdPreviewSurface.
-
Automatically generated swift code for (Camera, Capsule, Cone, Cube, Cylinder, Mesh, Plane, Sphere, and Xform) to implement the UsdGeomXformable API through the addition of a new swift macro @Xformable.
- Each of these types now autogenerate the
addXformOp()
,addTranslateOp()
,addScaleOp()
,addRotateXOp()
,addRotateYOp()
,addRotateZOp()
functions by simply declaring @Xformable before their extension declarations.
- Each of these types now autogenerate the
-
Removal of the
inout
requirement for all functions which take astage
argument to simplify the USD API and keep it consistent with Python and C++. -
The initial swift implementation of BasisCurves, Camera, Capsule, Cone, Cube, Cylinder, Mesh, NurbsCurves, NurbsPatch, Plane, Points, Sphere, Subset, and Xform. Eventually, each prim type defined by a USD schema; such as all these types, will have their swift code autogenerated with SwiftSyntax tied into UsdGenSchema, and provided as a swift package plugin for users to easily add their own additional schema-defined named API as extensions of the Pixar (or custom user provided) namespace(s).
Important
Currently in stable alpha, with many things still not tested or even attempted yet. If you experience any bugs or other strange behavior, we ask that you please submit a new issue ticket so that any issues that arise can be addressed and tracked, the goal of this project is to be a complete and comprehensive native integration of Pixar's USD into the Swift programming language. We also highly encourage feature requests and overall design considerations by all members of the community as well as the industry.
SwiftUSD is an inclusive project built for everyone, as free and open source software that is owned by its contributors.
What Works
Pixar/Base
- Pixar.Arch
- Pixar.Tf
- Pixar.Gf
- Pixar.Js
- Pixar.Trace
- Pixar.Vt
- Pixar.Work
- Pixar.Plug
Pixar/Usd
- Pixar.Ar
- Pixar.Kind
- Pixar.Sdf
- Pixar.Pcp
- Pixar.Usd
- Pixar.Ndr
- Pixar.Sdr
- Pixar.UsdGeom
- Pixar.UsdShade
- Pixar.UsdLux
Pixar/Imaging
- Pixar.CameraUtil
Pixar/UsdImaging
- Pixar.UsdShaders
-
Powered by 👾MetaverseKit v1.5.0 🌍.
Usage
To use this release of Pixar's USD in your swift project, add the following to your Package.swift file:
dependencies: [
.package(url: "/~https://github.com/wabiverse/SwiftUSD.git", from: "23.11.24"),
]
Note
Zero prerequisites, just run swift build
in your own swift app, game, library, or plugin.

Note