Skip to content

v23.11.36

Compare
Choose a tag to compare
@furby-tm furby-tm released this 05 May 22:31
· 166 commits to main since this release
6428fb0

What's New

🎧swift on.

SwiftUSD v23.11.36

Addition of UsdStage metadata getters and setters, and declarative vs. imperative api cleanup.

Important

Linux users: This release now links against Python 3.10 which differs with that of prior releases (pre v23.11.34) which used to link to Python 3.11, the intention is for a more out-of-the-box experience across the widest range of existing Linux users, if this has the opposite effect - please submit a new issue ticket and provide a more suitable Python version that works best for your use case, in addition to this if you are currently using Swift 5.9 - please upgrade to Swift 5.10 instead.

Changelog

  • Add UsdStage metadata getters and setters.
    /* getters (inout). */
    var value: Double = 0.0
    Usd.Stage.getMetadata("theArtOfArt", &value)
    
    /* setters. */
    let gloryOfExpression: Bool = Usd.Stage.setMetadata("comment", Tf.Token("Step 1: Empower graphics developers"))
    
    /* etc. */
    if gloryOfExpression == true
    {
      return Usd.Stage.hasAuthoredMetadata("simplicity")
    }
  • Fix conflicts with the experimental declarative api, so it is not easily confused with the standard USD API.
    • For declarative API usage please now use the uppercased prefix:

      • UsdStageUSDStage
      • UsdPrimUSDPrim
      /* now requires an uppercased (USD) prefix. */
       
      USDStage("HelloPixarUSD", ext: .usda)
      {
        USDPrim("Hello", type: .xform)
        {
          USDPrim("World", type: .sphere)
        }
      }
      .set(doc: "Stay Swifty.")
      .save()
    • For all users using the standard USD API (the typical case), continue to use the standard API as intended, no changes are required:

      • Usd.Stage
      • Usd.Prim
      /* no changes from before, keep doing you. */
      
      let stage = Usd.Stage.createNew("HelloPixarUSD.usda")
      
      UsdGeom.Xform.define(stage, path: "/Hello")
      UsdGeom.Sphere.define(stage, path: "/Hello/World")
      
      stage.getPseudoRoot().set(doc: "Hello World Example (Swift)!")
      
      stage.save()

Note

We now have CI workflows in order for Linux Ubuntu (x86/64) and macOS (arm64),
you can always check their build status from the root of this project repo's README.

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:

// swift-tools-version: 5.10

dependencies: [
  .package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "23.11.36")
]

The Wabi Foundation uses SwiftUSD to build the Kraken metaversal creation suite, you can always find an up to date configuration to use for your own Swift project here.



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
Boost boost-devel libboost-all-dev
Python python3-devel python3-dev
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