Skip to content

Commit

Permalink
Add stage metadata get/sets, prefix decl api.
Browse files Browse the repository at this point in the history
* Add some stage metadata getters and setters.
* Prefix the experiemental declarative api with
  uppercase letters, to avoid clashes with the
  standard usd api:
  UsdStage → USDStage
  UsdPrim → USDPrim
  • Loading branch information
furby-tm committed May 2, 2024
1 parent 081db71 commit 0e1a99f
Show file tree
Hide file tree
Showing 9 changed files with 304 additions and 51 deletions.
2 changes: 1 addition & 1 deletion DeclarativePixarUSD.usda
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#usda 1.0
(
doc = "SwiftUSD v23.11.35 | Declarative API"
doc = "SwiftUSD v23.11.36 | Declarative API"
)

def "DeclarativeScene"
Expand Down
2 changes: 1 addition & 1 deletion HelloPixarUSD.usda
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#usda 1.0
(
doc = "SwiftUSD v23.11.35"
doc = "SwiftUSD v23.11.36"
)

def Xform "Geometry"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ enum Creator

/* Create a new USD stage with a transform and a sphere. */

UsdStage("HelloPixarUSD", ext: .usda)
USDStage("HelloPixarUSD", ext: .usda)
{
UsdPrim("Hello", type: .xform)
USDPrim("Hello", type: .xform)
{
UsdPrim("World", type: .sphere)
USDPrim("World", type: .sphere)
}
}
.set(doc: "Stay Swifty.")
Expand Down
3 changes: 2 additions & 1 deletion Sources/PixarUSD/Usd/Usd/Prim.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import Foundation
import Usd

public typealias UsdStageWeakPtr = Pixar.UsdStageWeakPtr
public typealias UsdPrim = Pixar.UsdPrim

public extension Usd
{
Expand Down Expand Up @@ -95,7 +96,7 @@ public extension Usd
* Please refer to ``Notice`` for a listing of the events that could cause
* ``Notice/objectsChanged`` to be emitted.
*/
typealias Prim = Pixar.UsdPrim
typealias Prim = UsdPrim
typealias StageWeakPtr = UsdStageWeakPtr
}

Expand Down
Loading

0 comments on commit 0e1a99f

Please sign in to comment.