I’ll post the code in a bit
“`py from pxr import UsdSkel
node = hou.pwd() stage = node.editableStage()
skeleton_prim = None anim_prim = None
for prim in stage.Traverse() :
if prim.GetTypeName() == “Skeleton”:
skeleton_prim = prim
elif prim.GetTypeName() == “SkelAnimation”:
anim_prim = prim
anim_binding = UsdSkel.BindingAPI.Apply(skeleton_prim.GetPrim())
anim_rel = anim_binding.CreateAnimationSourceRel()
anim_rel.AddTarget(anim_prim.GetPrim().GetPath())
vis = skeleton_prim.GetAttribute(“visibility”)
vis.Set(“invisible”)“`
Here’s my file featuring all methods we discussed (you need the dragon and the shark models )
(that snippet also hides the skeleton so it doesn’t show on the dragon)
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20240002/13/24/waffles_usd_apply_anim.hip