I have a little script that for now updates a single value in a dat table. It works, but only if the Script Chop is on the same level as the table. If the table is placed one level up and to my knowledge correctly referenced to, the table is not updated.
The code:
def onCook(scriptOp):
scriptOp.clear()
running=int(op('running')['running'])
done=int(op('done')['done'])
test = int(op('SceneCounter')[0,0])
# test = int(op('../SceneCounter')[0,0])
test+=1
op('SceneCounter')[0,0] = test
op('../uSceneCounter')[0,0] = test
return
So I have two dat tables: one on the same level of the Script Chop and one a level above. The latter is not updated, but I do see a dotted line from the DAT table to the container that contains the script chop, so there is a reference. When I go into the container, the DAT actually is updated. So it seems the script is only executed when I am inside the container.
This leads me to the impression that I am overlooking some fundamental concept here…?
What I want: I made some custom operators: a container that holds a timer and some other stuff. Each time the container runs out, a counter should be incremented. But I want to be able to update that counter from multiple instances of my custom operator.