• @shinyformica, thanks. I will include the weakref version.

    I was also wondering if you had some globals-clearing code somewhere. Remembering some previous threads where the goal was to make Pythonista act like a fresh interpreter starting every time you run a script.

  • I hope this works out. My first attempt to make a video and post it. But the video is doing the steps above.

  • as I understand your code, it is not that data is getting duplicated, but you are using the same touch instance, since the touch Id is the same -- i.e you are updating the touch object, but not creating a new one. really, I think you sort of want to compute the rotation, etc parameters for each state, when the state object gets created, rather than manipulating the touch object in Data. Dunno.

    btw, the python built in debugger is called pdb, and does let you single step code, look at variables in real time, etc. But it is not really useful within scene, since it is console based. I am not sure if scene is compatible with the long press to set breakpoints in the python ista debugger.

Internal error.

Oops! Looks like something went wrong!