Python SOP get channel data CHOP

   7420   21   1
User Avatar
Member
21 posts
Joined: 5月 2013
Offline
Hi guys!

I got stuck again, with a similar problem, this time trying to get a value for a sop point attribute at a given frame.

Channels

channel = hou.node('../fileChop/OUT_AMPLITUDE')
value = nTrack.tracks().evalAtFrame(hou.frame())


Parameters

parm = node.parm(“tgl”)
value = parm.evalAsIntAtFrame(hou.frame() - 1)


Attributes

attr = geo.pointAttribs()
attr.evalAtFrame????????something maybe?


Is it possible to find out the value of a point attribute at a given frame? Cant find the correct syntax for it anyways, my solution was, hou.setFrame(myFrame) -> Evaluate attribute…
But I wasn't to happy with that solution.


well thanks again
User Avatar
Member
8594 posts
Joined: 7月 2007
Online
I'm not sure that's possible through python
maybe just import that attribute to chops with Geometry CHOP and sample that using mentioned method for chops at certain time

even if it was possible to sample attribute point value at certain time directly it would be probably slower than chop method considering that you may want to sample thousands of points every one at different time, which is pretty quick from already computed chops but slow if for every point the whole geometry needs to be cooked again at different time

another problem may be changing topology, which is pretty common in sops so point value at different time may be inconsistent or completely non-existent
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links