Skip to content

Commit

Permalink
Mark @discardableResult on newly added Usd.References API.
Browse files Browse the repository at this point in the history
Signed-off-by: furby™ <[email protected]>
  • Loading branch information
furby-tm committed Dec 1, 2024
1 parent db6b208 commit f276ed0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/PixarUSD/Usd/Usd/References.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ public extension Usd

public extension Usd.References
{
@discardableResult
mutating func addReference(_ ref: Sdf.Reference, position: Pixar.UsdListPosition = .backOfPrependList) -> Bool
{
AddReference(ref, position)
}

@discardableResult
mutating func addReference(assetPath: String,
primPath: Sdf.Path,
layerOffset: Sdf.LayerOffset = Sdf.LayerOffset(),
Expand All @@ -36,6 +38,7 @@ public extension Usd.References
AddReference(std.string(assetPath), primPath, layerOffset, position)
}

@discardableResult
mutating func addReference(assetPath: String,
layerOffset: Sdf.LayerOffset = Sdf.LayerOffset(),
position: Pixar.UsdListPosition = .backOfPrependList) -> Bool
Expand Down
2 changes: 2 additions & 0 deletions Sources/PixarUSD/Usd/Usd/Stage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ public extension Usd.Stage
* ancestors, and all of its descendants if `policy` is `.withDescendants`.
*
* If `policy` is `.withoutDescendants`, then payloads on descendant prims are not loaded. */
@discardableResult
func load(path: Sdf.Path = Sdf.Path.absoluteRootPath(),
policy: Pixar.UsdLoadPolicy = .withDescendants) -> Usd.Prim
{
Expand Down Expand Up @@ -748,6 +749,7 @@ public extension Usd.StageRefPtr
* ancestors, and all of its descendants if `policy` is `.withDescendants`.
*
* If `policy` is `.withoutDescendants`, then payloads on descendant prims are not loaded. */
@discardableResult
func load(path: Sdf.Path = Sdf.Path.absoluteRootPath(),
policy: Pixar.UsdLoadPolicy = .withDescendants) -> Usd.Prim
{
Expand Down

0 comments on commit f276ed0

Please sign in to comment.