# CreateSkeletonRel vs CreateAnimationSourceRel

**URL:** <https://forum.aousd.org/t/createskeletonrel-vs-createanimationsourcerel/1180>\
**Category:** USD\
**Created:** [January 28, 2024, 8:50pm UTC](https://forum.aousd.org/t/createskeletonrel-vs-createanimationsourcerel/1180 "2024-01-28T20:50:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![koen](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@koen](https://forum.aousd.org/u/koen)\
**Post date:** [January 28, 2024, 8:50pm UTC](https://forum.aousd.org/t/createskeletonrel-vs-createanimationsourcerel/1180/1 "2024-01-28T20:50:53Z")

</div>

Hello all,

I was looking at the example code for writing an animated skeleton:  
[Universal Scene Description: API Introduction (openusd.org)](https://openusd.org/release/api/_usd_skel __a_p_i__ intro.html#UsdSkel_API_WritingSkels)

the example mentions:

> binding = UsdSkel.BindingAPI.Apply(skel.GetPrim())  
> binding.CreateSkeletonRel().SetTargets([anim.GetPrim().GetPath()])

in my existing code, I use

> anim\_binding = UsdSkel.BindingAPI.Apply(skel\_prim.GetPrim())  
> anim\_rel = anim\_binding.CreateAnimationSourceRel()  
> anim\_rel.SetTargets([anim\_prim.GetPrim().GetPath(),])

reading the documentation, it seems to me the CreateSkeletonRel call would be used on a mesh to apply the skinning. Am I understanding this correctly and is this example using the wrong relationship?

As a side note, I really like the higher level UsdSkel documentation, it gives a great overview. I was wondering if this was a little mistake as well:

> valid,whyNot = topo.Validate()  
> if not valid:  
> Tf.Warn(“Invalid topology: %s”%reason)  
> return False

I would think reason there should ne whyNot?

Thanks,  
Koen

---

<div class="post-metadata">

**Author:** ![spiff](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/spiff/32/22_2.png) [@spiff](https://forum.aousd.org/u/spiff)\
**Post date:** [January 28, 2024, 9:11pm UTC](https://forum.aousd.org/t/createskeletonrel-vs-createanimationsourcerel/1180/2 "2024-01-28T21:11:47Z")

</div>

Oh snap - right on both counts, @koen ! Could you possibly create a GitHub Issue for these two, and we’ll get it fixed up?

Just wanted to note that the skl:skeleton binding could be established on a SkelRoot prim rather than individual meshes, and also that you _can_ bind animation to a SkelRoot/Mesh rather than a Skeleton, as well.

Thank you!

---

<div class="post-metadata">

**Author:** ![koen](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@koen](https://forum.aousd.org/u/koen)\
**Post date:** [January 28, 2024, 9:39pm UTC](https://forum.aousd.org/t/createskeletonrel-vs-createanimationsourcerel/1180/3 "2024-01-28T21:39:40Z")

</div>

Of course,

I’ll create an issue tomorrow. Thanks for the notes on the prims that can accept the bindings, I’ll double check if I might be able to simplify some.

Cheers,  
Koen

---

<div class="post-metadata">

**Author:** ![koen](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@koen](https://forum.aousd.org/u/koen)\
**Post date:** [January 29, 2024, 11:49am UTC](https://forum.aousd.org/t/createskeletonrel-vs-createanimationsourcerel/1180/4 "2024-01-29T11:49:15Z")

</div>

Just to update the thread, turns out Matias already fixed these and the dev branch shows correct code:  
[Universal Scene Description: API Introduction (openusd.org)](https://openusd.org/dev/api/_usd_skel __a_p_i__ intro.html#UsdSkel_API_WritingSkels)

Thanks Matias!
