Python operator parameter update

   3938   2   2
User Avatar
Member
6 posts
Joined: March 2009
Offline
Hello,

I have a very simple python operator with 1 parameter called “txt” which I'm setting to frame value.

Python code:
node = hou.pwd()
node.parm("txt").set(str(hou.intFrame()))


it all works fine when I go forwards on timeline. But when I step back the value doesn't changes and I don't why. I would like to update always.

Thank you for any advice

Attachments:
simple.hiplc (45.4 KB)

User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi,

It is most likely the object transform caching that is preventing the update - if an obj node's transform hasn't changed, houdini will skip cooking the node (unless you have some other time dependency somewhere, like any old parm with a $F expression for example).

To get around this just disable the ‘Cache Object Transform’ parameter on the node… On stock obj nodes this is in the ‘Misc’ tab, you might have to expose it on your asset (the asset is missing in the file so couldn't check thoroughly), or just set it's default value to 0 if you keep it hidden.

Hope that helps,
Henry
Henry Dean
User Avatar
Member
6 posts
Joined: March 2009
Offline
Hi,

Thank you so much! Disabling caching parameter solved the issues.
  • Quick Links