How to get channel values from other inputs with Channel Wrangle CHOP?

   5020   3   0
User Avatar
Member
365 posts
Joined: June 2013
Offline
Just like we can do @P = v@opinput1_P ; for Wrangle SOP I tried for Channel CHOP to do @V = @opinput1_V ; but it doesn't seem to import the same channel name and sample plugged on the second input.




How can we bring in values from other inputs? I'm not interested in transform structs for SRT but arbitrary data.

While one can always perform some calculations with Math CHOP, it would be maybe less verbose an preferable to have the freedom of vex to perform calculations.


Cheers
Edited by probiner - April 23, 2018 18:36:35
User Avatar
Member
8045 posts
Joined: Sept. 2011
Offline
the @opinput syntax is a one-off special for the attrib vop. The channel context never got the CVEX makeover, so we are left with the old ‘chinput()’ function.

chinput(int opinput, string channel_name, float sample) chinput(int opinput, string channel_name, int sample)
or

chinput(int opinput, int channel_index, float sample) chinput(int opinput, int channel_index, int sample)
Edited by jsmack - April 23, 2018 18:52:07
User Avatar
Member
365 posts
Joined: June 2013
Offline
I was looking about this one for a while!. Thanks jsmack, This does the trick! Example attached.



I wonder why chinput() has “type”, since I thought it was always float. Can one import multiple channels relative to the same attribute (vector, quat, matrix) with this function or the “type” is for some strict cases?

Attachments:
PRB_ChannelWrangleInput.hiplc (82.0 KB)

User Avatar
Member
13 posts
Joined: Nov. 2016
Offline
I hope this gets updated to become more inline with other parts of the program.
  • Quick Links