Dabbling with channel wrangles, can see this handy stuff in the info window (see attached image).
Is it possible to access that in a wrangle? I hoped chattr() would do it, but all my assumptions about what that attribute might be called aren't valid. Eg
intsuccess=0;
floatresult;
result = chattr(0,'channel','min',C,-1,success);
if (success) {printf('%s',result);
}else{printf('fail');
}
I'm sure I could get to it with other chop nodes, but would be nice to just pull it in directly via vex.
Can I throw in the idea of some channel creation functions…? I'm probably going to try writing some of these in the next few days, so I'll be back with some stupid questions.
I'll need to add more vex helper functions for chop.( chinput_minmax being one of them ). You need to be careful when doing loops in Channel wrangles because the code will be executed for each time sample and for each channel.
One way to get around that is to create an intermediate set of channels in a wrangle and make sure it has its first input unconnected and is setup in a non time dependent manner. This gives something similar to a detail wrangle in SOP, but with much more headaches. (It's the wave_compile_minmax node in the red group comment box).
Another way is to use the new per channel attributes that you can set/get with chsetattr/chattr. This gives you a single chain of nodes and you can store attribute on channels, but the Channel Wrangle doesn't yet support being executed only one time per channel when the node has multiple time samples.
friedasparagus Ah sugar lumps! I was thinking that iterating over channels meant that it would only run a loop once for each channel…
It isn't clear. I think Over all Samples computes all the samples from the first channel, then moves on the next channel. It's the legacy iteration mode where you couldn't write to multiple channels at the same time.
Over all Channels, sets the time to the first sample, then iterates over all the channels. sets the time to the second sample, iterates over all the channels and so on.
Every Nth Channels is the same as Over all Channels, but it regroups multiple channels together.
as a side question, while talking about Channel VOP/Wrangle CHOP, this seems to be based on the old vopchop, is there a plan to make a CVEX version?
Or even something more customized that'd allow for binding(in/out) channels or channel groups by name/pattern? Like Volume VOP allows for volumes, that would be invaluable
I guessed as much I know things along these lines have been said before, but for thoughts in a forum thread barely a month old to actually make it into the software is just bloomin' great! Keep it up!
@Guillaume, please, I have tried this new function chinputlimits(). - chinputlimits(0,0,…) iterates fine and gives me min/max - chinputlimits(0,1,…) seems to evaluate just the first sample … not over all the range
Am I doing something wrong? I have attached my file.
tamte as a side question, while talking about Channel VOP/Wrangle CHOP, this seems to be based on the old vopchop, is there a plan to make a CVEX version?
Or even something more customized that'd allow for binding(in/out) channels or channel groups by name/pattern? Like Volume VOP allows for volumes, that would be invaluable
and yes we do want to move to CVEX, but it isn't something that can happen overnight. I'll probably start by adding CHOP lookup functions to CVEX. Currently, you need to use a Channel SOP to import CHOP data into SOP, even if you are using wrangles.
So if I use Guillaume's method for generating min/max as an attribute on a channel. How would I fetch that value from a Python node in the /obj context?
I am trying to find the min/max rotation range for each bone in a mocap skeleton. So the CHOP channel attribute is stored within the hou.Track()?
Edited by Enivob - May 5, 2018 10:51:05
Using Houdini Indie 20.0 Windows 11 64GB Ryzen 16 core. nVidia 3050RTX 8BG RAM.