Python Expression in Parameter cooked way too many times

   Views 257   Replies 1   Subscribers 0
User Avatar
Member
2 posts
Joined: 10月 2021
Offline
When searching for keyframes inside Python Expression on parameter, it cookes wayyyy too many times (I assume because of recursive evaluation?). So basically, parm.keyframes() or parm.eval(), or anything like that and it gets cooked at least like 300 times.

Because of that it pretty hard to do more complex stuff, for example, custom interpolation functions.

Is there any alternative way to do that, or maybe cook only once or twice, not >300?

Example code for `tx` parameter:
print("Hi!")
hou.pwd().parm("tx").keyframes()

Edited by safebell - 2025年4月18日 08:49:06
User Avatar
Member
2 posts
Joined: 10月 2021
Offline
Solved by using `hou.text.expandString("$IT")` to access start time of the segment
  • Quick Links