<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelDeformation/Skinning-swift.struct/replaceInfluenceJointIndices(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityCoreDeformation08LowLevelC0C8SkinningV28replaceInfluenceJointIndicesyxxs14MutableRawSpanVzXEKRi_zlF"
  },
  "title" : "replaceInfluenceJointIndices(_:)"
}
-->

# replaceInfluenceJointIndices(_:)

Fills the influence joint index buffer using the given closure.    ///
After the closure returns, the framework validates every index. An out-of-range
index causes a throw.

```
func replaceInfluenceJointIndices<R>(_ body: @_lifetime(0: copy 0) (inout MutableRawSpan) -> R) throws -> R where R : ~Copyable
```

## Parameters

`body`

A closure that receives a mutable span over the buffer.

## Return Value

The value returned by `body`.

## Discussion> Throws: If any index is outside `[0, skinning.jointTransformCount)`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)