What happened here was that older builds were modifying DAT contents somewhat unreliably.
The clear() and other methods should only be called within the scripts onCook() operator, otherwise
the script may overwrite it when it eventually executes onCook().
In this case, add the line:
op(‘script1’).lock = True
before attempting to clear it.
This will lock the operator though.
If you really do need the Script DAT to manage its contents, then the clear() call should be there, not in the Execute DAT.
@rob interesting that this change was implemented. It unfortunately breaks a lot of things for me but also the fix is not really complicated, just need to go through and make sure the script chop or sop is locked.
If someone is not using the script chop/dat callback at all (disabled, removed), and is writing to that node as a sort of data buffer from else where, is there still some kind of unreliability factor?
It wouldn’t necessarily be unreliable, but there would be nothing stopping the script from updating itself again with new callbacks.
Locking it guarantees it will only be modified outside the onCook callbacks.