Attatching a script to an object...through python?

(LethalSideP) #1

Hiya guys. I’ll keep this brief.

I’ve been playing about with the 2.25 API for quite a while now, and I’ve got a script which might actually really be going somewhere…I’m not giving away too many details at this stage for many reasons, but there’s one feature I’d really like to put in there. It involves making one object track to another.

Now, I know that you can’t directly make one object track another using the python API. But I’ve written a script which essentially does the same thing - gets the linked object, makes it track to another (using the on redraw thingy).

Anyhow, I’ve got 2 scripts now - the master one (the one which does all the magic) and this tracking one. Is it possible for my master script to get an object, and assign the tracking script to this object as a ‘on redraw’? Can one script assign another script to an object, in short?

Thanx guys.