RESOLVED: win 2018.23080 Force cook

win 2018.23080
Seems ForceCook doesn’t work for trailCHOP and some TOPs.

youtu.be/2dRN6J9l6tk
ForceCook.toe (4.23 KB)

Touch is a pull based system, so I don’t think what you’re seeing is actually a bug - I think it’s a feature. If you add a null set to always cook after your trail it will update when you’re not in the container. To see your TOPs update you need to display them in some way.

But as I checked wiki:

OP.cook(force=False, recurse=False)→ None:

Cook the contents of the operator if required.
force - (Keyword, Optional) If True, the operator will always cook, even if it wouldn’t under normal circumstances.

imaga - where are you calling

op.cook(force=True)

I don’t see that in your example.

A python call to force cook will only force cook the operator once (when you issue that python call) otherwise Touch will resume its pull only behavior.

It is not in video

So if I understand right:
OP.cook(force=False) - will perform one cook if it is nessecery.
OP.cook(force=True) - will perform one cook anyway

The word ‘always’ in wiki cause understand this like “Flag this OP to be cooked every frame” not “Cook this OP once anyway”

So there is no way to simply mark OP to be cooked forever?

Sorry)

That’s correct, the cook() command will be executed only once.

Here’s one of the most useful pages on the wiki to help you understand when a node will cook in TD: What Causes Cooking

So, after reading that, here are some different ways to make a node always cook:

  • make sure something is always requesting its output (for instance by placing a Null CHOP set to ‘cook: always’ behind it, of if it’s a TOP it should be contributing to your visual output)

or

  • make sure the view flag is on and you are viewing the node

or

  • place an Execute DAT, enable the Frame Start toggle, and place something like this code in it:

def onFrameStart(frame): op('Mynode').cook(force=True) return
this will execute the cook command at the start of every frame.

1 Like

Thank you very much!

Now it’s clear.