CreateSkeletonRel vs CreateAnimationSourceRel

Hello all,

I was looking at the example code for writing an animated skeleton:
Universal Scene Description: API Introduction (openusd.org)

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

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!

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

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)

Thanks Matias!