Hey all,
Sorry to add another Python cooking question (I've seen a lot, searching), but here goes.
I have two subnets, a 'source' (from an .fbx) and a 'target'. The Objects in each correlate by name, and those in the source subnet are keyframe-animated. I'm driving the target Objects via:
sourceMg = sourceNode.worldTransform()
# beep boop, additional calculations go here
targetNode.setWorldTransform(sourceMg)
It works great, but once Houdini caches the frame the script is no longer (apparently) cooked, which makes sense--I pasted my code into a Python Script Object for convenient testing, which I suppose is not its intended use. If the HOM documentation is telling me what to do instead, however, I don't see it. There's the 'Python object' page, but I don't know that this is quite the same.
In short: my script works as intended, but after the scene plays through once, Python stops moving the target nodes (I'm guessing because Houdini quits cooking it, since it's not doing anything Houdini expects it to do, like make geometry). Where does a script like this belong? I'm sure there's something embarrassingly obvious I'm missing--it's just a little extra confusing to me because I have to manipulate everything on the Object level.
Thanks in advance for the help! If anything's unclear, lemme know