How to get the input value on an Animation CHOP?

Hello,

I am stuck with something that could sound basic, but still, I’m stuck :S
How can I get the input of a CHOP to use it in itself with an expression?

Practically: I have a slider I would like to use to control the speed of an Animation CHOP. I then pluged the slider output into the input (in) of the Animation CHOP, I set the Play Mode to Sequencial and well try to get the input value in the Speed parameter with an expression.

It is important here to reference the input plug of the Anim CHOP itself and not to have a reference to the input node so that I can plug another node later without having to relink. It would also be possible to use a Null as an input node, and I made it work like that at the beginning, but I would really be interested in having the answer for self referencing the Anim CHOP.

So I tried expressions such as in, opinput(“./”,0), $V… None of them gives the expected result.

Any ideas?

By the way, annexe question: how can I yank an input or output of a node? I don’t know how to grab it…

Thanks a lot

The input connector on the Animation is only used for specifying what part of the animation to playback when Play Mode = Use Input Index.

The expression you want (I am assuming version 077 based on your example) is the chop() expression.

chop(“oppath:channelname”)

Refer to attached example.
speedexample077.tox (2.44 KB)

… Indeed :open_mouth:

I didn’t noticed that because it worked in my case: the speed channel was connected to the Animation Input with a Play Mode = Sequencial, but at the same time the speed had the expresssion chop(“null3:speedval”). I see now from what you said that when the null and the Animation are disconnected it is still working.

So, regarding the way to get the output of a CHOP for the speed, I am currently already using the chop() expression (it is one of the few I start to master).

Nevertheless the point I try to understand, because I think it would fit well my way of working, is still there:
:question: How can I access an input channel of an operator in one of its parameters?

Based on your attached example, my question would be: Can I use the input channel to control the speed ?
I know in this example it sounds like a hack: it consist in using a dedicated input for another purpose. But what if I want to bind several parameters of an op to one of its inputs?
The advantage is it allows me to plug any chop in without having anything “hardcoded”: the use of thechop() expression for instance requires to know the name of the op and the name of the channel.

I provide a less dirty example than the hack I mentionned:
The Animation chop has a new input named inSpeed.
What is the expression I can use in the Speed parameter to get this input?
I guess it could be something like chop(“.:inSpeed”) except that inSpeed is an input, not an output.
At the end I would like to be able to plug indifferently the constants speed1 or speed2.

Secondary question:
:question: Still in my example, how can I see/check the value taken by Speed?
In other words, how can I use an op parameter as a channel?
I didn’t see how to input Speed into a constant or a trail or a null…

:bulb:
Underlying all my questions is the fact that it is really difficult for a newby to get into the step of use of TD to design projects where it is more than just plugging nodes but less than scripting. In the middle there is someting where expressions and references are used extensively. I find it hard because there are not a lot of examples and tutotials oriented this way in the documentation. There is for example this very good video, which helped me a lot, but otherwise some basic concepts are spread out in several tutorials:
http://www.derivative.ca/wiki077/index.php?title=Ways_to_Generate_Triggers_and_Cause_Actions_Vid

To me there is like a missing step in the tutorials covering all the ways to access to a channel, to modify it, to convert parameters as channels and to explicitely says what can be done and what cannot.
And as things have not been put very clearly somewhere during my learning process of TD I think I also mix things up with Houdini, which has also a very confusing approach of expressions, HScript and Python.

So appart from my questions my suggestions would be:

  • to have a new tutorial covering the mentionned concepts
  • to have a strong tutorial on Python for 088 because Python is a major feature for TD and as a standard it may help to dive into TD scriptin g more easily.

Thank you very much for your help and your understanding,

Best regards
speedexample077_modified.tox (1.98 KB)