Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/build-swiftusd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
description: 'OpenUSD ref'
required: false
type: string
default: 'v25.08'
default: 'v26.03'

build-targets:
description: 'Build target list, or ALL'
Expand Down
2 changes: 1 addition & 1 deletion Examples/HelloSwiftUsd_CLI_SPM/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let package = Package(
name: "HelloSwiftUsd_SPM",
platforms: [.macOS(.v15)],
dependencies: [
.package(url: "https://github.com/apple/SwiftUsd", from: "5.2.0"),
.package(url: "https://github.com/apple/SwiftUsd", from: "6.0.0"),
],
targets: [
.executableTarget(
Expand Down
2 changes: 1 addition & 1 deletion Examples/HelloSwiftUsd_CLI_SPM/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//
import OpenUSD

public typealias pxr = pxrInternal_v0_25_8__pxrReserved__
public typealias pxr = pxrInternal_v0_26_3__pxrReserved__


func makeHelloWorldString() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
repositoryURL = "https://github.com/apple/SwiftUsd";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.2.0;
minimumVersion = 6.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import Foundation
import OpenUSD

public typealias pxr = pxrInternal_v0_25_8__pxrReserved__
public typealias pxr = pxrInternal_v0_26_3__pxrReserved__


func makeHelloWorldString() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
repositoryURL = "https://github.com/apple/SwiftUsd";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.2.0;
minimumVersion = 6.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import SwiftUI
import OpenUSD

public typealias pxr = pxrInternal_v0_25_8__pxrReserved__
public typealias pxr = pxrInternal_v0_26_3__pxrReserved__


func makeHelloWorldString() -> String {
Expand Down
8 changes: 6 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func cppTarget_dependencies() -> [Target.Dependency] {
.target(name: "_Usd_EsfUsd_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_Usd_Exec_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_Usd_ExecGeom_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_Usd_ExecIr_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_Usd_ExecUsd_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_Usd_Garch_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_Usd_GeomUtil_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
Expand Down Expand Up @@ -163,11 +164,12 @@ func cppTarget_dependencies() -> [Target.Dependency] {
.target(name: "_Usd_Work_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_blosc_xcframework", condition: .when(platforms: [.macOS])),
.target(name: "_boost_iostreams_xcframework", condition: .when(platforms: [.macOS])),
.target(name: "_embree3_xcframework", condition: .when(platforms: [.macOS])),
.target(name: "_embree4_xcframework", condition: .when(platforms: [.macOS])),
.target(name: "_hdEmbree_xcframework", condition: .when(platforms: [.macOS])),
.target(name: "_hdStorm_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_hioAvif_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_hioImageIO_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_hioOpenEXR_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_sdrGlslfx_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_usdAbc_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
.target(name: "_usdShaders_xcframework", condition: .when(platforms: [.iOS, .macOS, .visionOS])),
Expand Down Expand Up @@ -204,6 +206,7 @@ func xcframeworkBinaryTargets() -> [Target] {
.binaryTarget(name: "_Usd_EsfUsd_xcframework", path: "swift-package/Libraries/Usd_EsfUsd.xcframework"),
.binaryTarget(name: "_Usd_Exec_xcframework", path: "swift-package/Libraries/Usd_Exec.xcframework"),
.binaryTarget(name: "_Usd_ExecGeom_xcframework", path: "swift-package/Libraries/Usd_ExecGeom.xcframework"),
.binaryTarget(name: "_Usd_ExecIr_xcframework", path: "swift-package/Libraries/Usd_ExecIr.xcframework"),
.binaryTarget(name: "_Usd_ExecUsd_xcframework", path: "swift-package/Libraries/Usd_ExecUsd.xcframework"),
.binaryTarget(name: "_Usd_Garch_xcframework", path: "swift-package/Libraries/Usd_Garch.xcframework"),
.binaryTarget(name: "_Usd_GeomUtil_xcframework", path: "swift-package/Libraries/Usd_GeomUtil.xcframework"),
Expand Down Expand Up @@ -269,11 +272,12 @@ func xcframeworkBinaryTargets() -> [Target] {
.binaryTarget(name: "_Usd_Work_xcframework", path: "swift-package/Libraries/Usd_Work.xcframework"),
.binaryTarget(name: "_blosc_xcframework", path: "swift-package/Libraries/blosc.xcframework"),
.binaryTarget(name: "_boost_iostreams_xcframework", path: "swift-package/Libraries/boost_iostreams.xcframework"),
.binaryTarget(name: "_embree3_xcframework", path: "swift-package/Libraries/embree3.xcframework"),
.binaryTarget(name: "_embree4_xcframework", path: "swift-package/Libraries/embree4.xcframework"),
.binaryTarget(name: "_hdEmbree_xcframework", path: "swift-package/Libraries/hdEmbree.xcframework"),
.binaryTarget(name: "_hdStorm_xcframework", path: "swift-package/Libraries/hdStorm.xcframework"),
.binaryTarget(name: "_hioAvif_xcframework", path: "swift-package/Libraries/hioAvif.xcframework"),
.binaryTarget(name: "_hioImageIO_xcframework", path: "swift-package/Libraries/hioImageIO.xcframework"),
.binaryTarget(name: "_hioOpenEXR_xcframework", path: "swift-package/Libraries/hioOpenEXR.xcframework"),
.binaryTarget(name: "_sdrGlslfx_xcframework", path: "swift-package/Libraries/sdrGlslfx.xcframework"),
.binaryTarget(name: "_usdAbc_xcframework", path: "swift-package/Libraries/usdAbc.xcframework"),
.binaryTarget(name: "_usdShaders_xcframework", path: "swift-package/Libraries/usdShaders.xcframework"),
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Before you can start using SwiftUsd, you need to add it as a dependency to your
1. To use SwiftUsd in a Swift Package, first add it as a dependency:
```swift
dependencies: [
.package(url: "https://github.com/apple/SwiftUsd", from: "5.2.0"),
.package(url: "https://github.com/apple/SwiftUsd", from: "6.0.0"),
]
```

Expand Down
5 changes: 5 additions & 0 deletions SwiftUsd.docc/AboutThisRepo/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Changes to SwiftUsd
```
}

### 6.0.0
Released 2026-02-26, based on OpenUSD v26.03
- Move from OpenUSD v25.08 to v26.03
- Set up GitHub Actions CI for SwiftUsd

### 5.2.0
Released 2025-11-20, based on OpenUSD v25.08
- Add support for the universal binaries on macOS, iOS simulator, visionOS, and visionOS simulator. (Note that the default SwiftUsd package uses Apple Silicon-only binaries)
Expand Down
3 changes: 3 additions & 0 deletions SwiftUsd.docc/AboutThisRepo/Miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Miscellaneous details about this repo
- `SwiftUsd/.build`
Swift Package Manager build directory from running `./scripts/build_symbol_graphs.zsh`. Only needed by advanced users. Not tracked by git.

- `SwiftUsd/.github`
Github Actions directory

- `SwiftUsd/.spi.yml`
Swift Package Index Manifest file.

Expand Down
2 changes: 2 additions & 0 deletions SwiftUsd.docc/AboutThisRepo/ReleaseChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ Checklist for releasing new versions of SwiftUsd
1. [Getting Started](<doc:GettingStarted>)
1. [Building Locally](<doc:BuildingLocally>)
1. Links to vanilla OpenUSD source files on GitHub
1. Default openusd-ref in .github/workflows/build-swiftusd.yml
1. Pixar namespace
1. [Getting Started, "Using SwiftUsd"](<doc:GettingStarted#Using-SwiftUsd>)
1. [Getting Started, "Common Issues"](<doc:GettingStarted#Common-issues>)
1. Typealias in each Xcode project/Swift Package in Examples
1. Xcode, OS
1. [Getting Started](<doc:GettingStarted>). Include build numbers as well
1. SwiftUsd
Expand Down
2 changes: 1 addition & 1 deletion SwiftUsd.docc/Essentials/Capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let numbers: pxr.VtIntArray = [1, 2, 3] // VtIntArray conforms to ExpressibleByA
```

### TfNotice support
Swift code can register for `TfNotice` callbacks by using [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13).
Swift code can register for `TfNotice` callbacks by using [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red).

```swift
class StageWatcher {
Expand Down
2 changes: 1 addition & 1 deletion SwiftUsd.docc/Essentials/DifferencesInSwift.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ for (iter, prim) in pxr.UsdPrim.PreAndPostVisit(stage.GetPseudoRoot()).withItera
```

### TfNotice
Swift code can register for `TfNotice` callbacks by using [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13). Instead of creating a C++ class or struct that inherits from `pxr::TfWeakBase`, call [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13) and pass a closure:
Swift code can register for `TfNotice` callbacks by using [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red). Instead of creating a C++ class or struct that inherits from `pxr::TfWeakBase`, call [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red) and pass a closure:

```swift
func registerWithRevoking(stage: pxr.UsdStage) {
Expand Down
8 changes: 4 additions & 4 deletions SwiftUsd.docc/Essentials/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Adding SwiftUsd to your project or package
Before you can start using SwiftUsd, you need to add it as a dependency to your Xcode project or Swift Package, and then configure a few build settings.


> Important: Tested with OpenUSD v25.08, Xcode 26.1.1 (17B100) on macOS 15.6 (24G84), iPadOS 26.0 (23A341), and visionOS 26.1 (23N49).
> Important: Tested with OpenUSD v26.03, Xcode 26.2 (17C52) on macOS 15.6 (24G84), iPadOS 26.0 (23A341), and visionOS 26.1 (23N49).

### Xcode project
1. To use SwiftUsd in an Xcode project, select File > Add Package Dependencies..., and enter the following URL:
Expand All @@ -23,7 +23,7 @@ https://github.com/apple/SwiftUsd
1. To use SwiftUsd in a Swift Package, first add it as a dependency:
```swift
dependencies: [
.package(url: "https://github.com/apple/SwiftUsd", from: "5.2.0"),
.package(url: "https://github.com/apple/SwiftUsd", from: "6.0.0"),
]
```

Expand All @@ -50,7 +50,7 @@ Once you've added SwiftUsd as a package depedency to your Xcode project or Swift
```swift
import OpenUSD

public typealias pxr = pxrInternal_v0_25_8__pxrReserved__
public typealias pxr = pxrInternal_v0_26_3__pxrReserved__

func makeHelloWorldString() -> String {
let stage = Overlay.Dereference(pxr.UsdStage.CreateInMemory())
Expand All @@ -72,7 +72,7 @@ print(makeHelloWorldString())
**Solution**: In the Build Settings for your target, make sure that `C++ Language Dialect` is set to `GNU++17 [-std=gnu++17]`. (`CLANG_CXX_LANGUAGE_STANDARD=gnu++17` for xcconfig files.)

- Building fails with `'<Some Type Here>' is not a member type of enum '__ObjC.pxr'`.
**Solution**: Add `public typealias pxr = pxrInternal_v0_25_8__pxrReserved__` to one of your Swift files and rebuild.
**Solution**: Add `public typealias pxr = pxrInternal_v0_26_3__pxrReserved__` to one of your Swift files and rebuild.

- App launches but immediately crashes, and the console says something like `dyld[84216]: Library not loaded: @rpath/Usd_UsdLux.framework/Usd_UsdLux`
**Solution**: In the Build Settings for your target, make sure that `Runpath Search Paths` is set to `@executable_path/Frameworks`. (`LD_RUNPATH_SEARCH_PATHS=@executable_path/Frameworks` for xcconfig files.)
Expand Down
8 changes: 4 additions & 4 deletions SwiftUsd.docc/NewSymbolDocumentation/WorkingWithTfNotice.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Learn how to use the TfNotice notification subsystem in Swift
OpenUSD includes a notification subsystem based on `pxr::TfNotice` and `pxr::TfNotice::Register` for use in C++. SwiftUsd exposes this system to Swift with minor modifications.

Like in C++, TfNotice registration in Swift comes in three main forms:
- [`pxr.TfNotice.Register(_:_:)`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13) to register for a particular notice type, regardless of sender
- [`pxr.TfNotice.Register(_:_:_:)`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:_:)-8j5mu) to register for a particular notice type from a specific sender, without retrieving the sender in the notification callback
- [`pxr.TfNotice.Register(_:_:)`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red) to register for a particular notice type, regardless of sender
- [`pxr.TfNotice.Register(_:_:_:)`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:_:)-22ec6) to register for a particular notice type from a specific sender, without retrieving the sender in the notification callback
- [`pxr.TfNotice.Register(_:_:_:)`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:_:)-(_,_,(Notice,Sender)->())) to register for a particular notice type from a specific sender while retrieving the sender in the notification callback

Example usage:
Expand All @@ -33,7 +33,7 @@ class StageWatcher {

## Downcasting and inheritance

When registering for a notice type, your notification callback may be called if notices that derive from the notice type you registered for are sent. To support conditional casting of `TfNotice` values in the notification callback, SwiftUsd provides ``/OpenUSD/C++/pxr/TfNotice/NoticeCaster`` and three auxillary forms of [`pxr.TfNotice.Register()`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13) that provide the [`NoticeCaster`](doc:/OpenUSD/C++/pxr/TfNotice/NoticeCaster) as a parameter to the notification callback:
When registering for a notice type, your notification callback may be called if notices that derive from the notice type you registered for are sent. To support conditional casting of `TfNotice` values in the notification callback, SwiftUsd provides ``/OpenUSD/C++/pxr/TfNotice/NoticeCaster`` and three auxillary forms of [`pxr.TfNotice.Register()`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red) that provide the [`NoticeCaster`](doc:/OpenUSD/C++/pxr/TfNotice/NoticeCaster) as a parameter to the notification callback:

```swift
func registerWithDowncasting() {
Expand All @@ -50,7 +50,7 @@ func registerWithDowncasting() {

## Cancellation

To cancel a notification callback, pass the return value from [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13) to [`pxr.TfNotice.Revoke`](doc:/OpenUSD/Revoke-31sr0):
To cancel a notification callback, pass the return value from [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red) to [`pxr.TfNotice.Revoke`](doc:/OpenUSD/Revoke-31sr0):

```swift
func registerWithRevoking(stage: pxr.UsdStage) {
Expand Down
2 changes: 1 addition & 1 deletion SwiftUsd.docc/SymbolExtensions/TfNotice.NoticeCaster.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

Use this type's ``callAsFunction(_:)`` or ``cast(to:)`` functions to conditionally downcast notices in a [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13) callback.
Use this type's ``callAsFunction(_:)`` or ``cast(to:)`` functions to conditionally downcast notices in a [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red) callback.

```swift
func registerWithDowncasting() {
Expand Down
15 changes: 15 additions & 0 deletions SwiftUsd.docc/SymbolExtensions/TfNotice.Register(_:_:)-28red.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ``/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red``

@Metadata {
@DocumentationExtension(mergeBehavior: override)
}

Register a listener as being interested in a TfNotice, regardless of sender.

Registration of interest in a notice class `N` automatically registers interest in all classes derived from `N`. When a notice of appropriate type is received, the `callback` is called with the notice.

To reverse the registration, call ``OpenUSD/Revoke-31sr0`` on the ``/OpenUSD/SwiftKey`` object returned by this call.

This form of registration listens for a notice globally. Prefer listening to a notice from a particular sender whenever possible (see overloads).

Additionally, all forms of registration can also support dynamically downcasting notice types in the callback (see overloads).
15 changes: 0 additions & 15 deletions SwiftUsd.docc/SymbolExtensions/TfNotice.Register(_:_:)-99j13.md

This file was deleted.

11 changes: 11 additions & 0 deletions SwiftUsd.docc/SymbolExtensions/TfNotice.Register(_:_:_:)-22ec6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ``/OpenUSD/C++/pxr/TfNotice/Register(_:_:_:)-22ec6``

Register a listener as being interested in a TfNotice from a particular sender.

Registration of interest in a notice class `N` automatically registers interest in all classes derived from `N`. When a notice of appropriate type is received, the `callback` is called with the notice.

To reverse the registration, call ``OpenUSD/Revoke-31sr0`` on the ``/OpenUSD/SwiftKey`` object returned by this call.

This form of registration listens for notices from a particular sender, without receiving the sender. The sender being registered for must be derived from `pxr::TfWeakBase`.

Additionally, all forms of registration can also support dynamically downcasting notice types in the callback (see overloads).
11 changes: 0 additions & 11 deletions SwiftUsd.docc/SymbolExtensions/TfNotice.Register(_:_:_:)-8j5mu.md

This file was deleted.

4 changes: 2 additions & 2 deletions SwiftUsd.docc/SymbolExtensions/TfNotice.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

### Type Methods
@Links(visualStyle: list) {
- ``Register(_:_:)-99j13``
- ``Register(_:_:_:)-8j5mu``
- ``Register(_:_:)-28red``
- ``Register(_:_:_:)-22ec6``
- ``Register(_:_:_:)-(_,_,(Notice,Sender)->())``
- ``Register(_:_:)-(_,(Notice,pxr.TfNotice.NoticeCaster)->())``
- ``Register(_:_:_:)-(_,_,(Notice,pxr.TfNotice.NoticeCaster)->())``
Expand Down
2 changes: 1 addition & 1 deletion SwiftUsd.docc/SymbolExtensions/TfNoticeProtocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

Protocol representing `pxr::TfNotice` subclasses.

If you create custom [`pxr::TfNotice`](doc:/OpenUSD/C++/pxr/TfNotice) subclasses in C++, you can enable SwiftUsd's [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-99j13) for them by conforming to this protocol and following the patterns in `SwiftUsd/source/generated/TfNoticeProtocol.swift` by rote.
If you create custom [`pxr::TfNotice`](doc:/OpenUSD/C++/pxr/TfNotice) subclasses in C++, you can enable SwiftUsd's [`pxr.TfNotice.Register`](doc:/OpenUSD/C++/pxr/TfNotice/Register(_:_:)-28red) for them by conforming to this protocol and following the patterns in `SwiftUsd/source/generated/TfNoticeProtocol.swift` by rote.
4 changes: 2 additions & 2 deletions SwiftUsd.docc/TechnicalDetails/BuildingLocally.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ SwiftUsd comes with pre-built OpenUSD binaries that make it easy to start using
git clone git@github.com:apple/SwiftUsd.git ~/SwiftUsd
```

2. Clone OpenUSD v25.08
2. Clone OpenUSD v26.03
```zsh
git clone https://github.com/PixarAnimationStudios/OpenUSD.git ~/SwiftUsd/openusd-source
cd ~/SwiftUsd/openusd-source
git checkout v25.08
git checkout v26.03
```

3. Apply `openusd-source.patch` to it
Expand Down
Loading
Loading