[AGENT] - Deleting existing clip

   1193   2   1
User Avatar
Member
7 posts
Joined: Jan. 2021
Offline
Hi guys ! Is there a way to delete a clip from an agent ?
I try to overwrite prim intrinsic attributes "agentclipcatalog" & "agentclipcatalogfilenames" but it can't be overwrited.

Do you have an idea ?

Thanks !
User Avatar
Staff
733 posts
Joined: Oct. 2012
Offline
I think the only way to do this is in Python via hou.AgentDefinition
If there is a good use case for this please RFE adding it to the Agent Clip SOP. I haven't come across many use cases for needing to do this, especially since the clip library is delay-loaded from disk.
User Avatar
Member
7 posts
Joined: Jan. 2021
Offline
Hi,thank's for your answer.

In fact python was the solution. Thank's to WaffleboyTom on Discord, I came out with this solution :

node = hou.pwd()
geo = node.geometry()

for prim in geo.prims():
    
    adef = prim.definition()
    fadef = adef.freeze()
    fadef.removeClip("idle2")
    prim.setDefinition(fadef)

Thank's for your answer !
  • Quick Links