Hi all!
Im completely stuck writing my second Python SOP. What I want to do is in my py sop get data from a specific chops channel that the user specifies with an absolut path. I want to be able to sample the chops channel on different frames (current, previous and next).
If someone could point me in the right direction, maybe with a line of code for how to point to this chop node, that would be much appreciated!
I've been trying with hou.ChopNode and hou.Track but couldn't figure out how to init / set it up.
My chop network is really simple, starts with a file, followed by a filter and a trigger and ends with a null containing one channel, amplitude.
Thanks for your time
/John
Python SOP get channel data CHOP
7399 21 1- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- edward
- Member
- 7725 posts
- Joined: July 2005
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
Hi! Thanks for you reply!
For some reason I can't figure this out
Is the chopnode in your example the same as
>>> chopnode = hou.node('/obj/music/OUT_AMPLITUDE')
because when I run the code in the python shell for testing purposes
I get this error
>>> chopnode = hou.node('/obj/music/OUT_AMPLITUDE')
>>> chopnode.tracks().evaluateAtFrame(100)
Traceback (most recent call last):
File “<console>”, line 1, in <module>
AttributeError: ‘Track’ object has no attribute ‘evaluateAtFrame’
>>>
I've attached my hip file with my python sop in it, but if I could get the code working in the python shell i think I could take it from there.
For some reason I can't figure this out
Is the chopnode in your example the same as
>>> chopnode = hou.node('/obj/music/OUT_AMPLITUDE')
because when I run the code in the python shell for testing purposes
I get this error
>>> chopnode = hou.node('/obj/music/OUT_AMPLITUDE')
>>> chopnode.tracks().evaluateAtFrame(100)
Traceback (most recent call last):
File “<console>”, line 1, in <module>
AttributeError: ‘Track’ object has no attribute ‘evaluateAtFrame’
>>>
I've attached my hip file with my python sop in it, but if I could get the code working in the python shell i think I could take it from there.
- graham
- Member
- 1908 posts
- Joined: Nov. 2006
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- edward
- Member
- 7725 posts
- Joined: July 2005
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
- John Svensson
- Member
- 1 posts
- Joined: May 2013
- Offline
- John Svensson
- Member
- 1 posts
- Joined: May 2013
- Offline
- johnsvensson
- Member
- 21 posts
- Joined: May 2013
- Offline
-
- Quick Links