Use Case Examples for Python in TD

Hi all,

So I’ve been compiling some tools and resources for teaching TD to students and one of the biggest things I’d like to do is integrate Python more. However, I have come to find a lot of students question the “necessity” of Python, and while I have the usual benefits of using Python in TD (references, executes, etc), a lot of the students also ask about other use cases. So my question is, could you propose any use cases wherein Python for TD would be beneficial in regards to new/intermediate TD users? Any ideas you have would be awesome!

Thanks everyone

Here’s an ‘intermediate’ example from some work I was doing the other day:

I’m working with a team of other TD developers on a project.

Another developer is accustomed to using the root.time and transport controls for animating and playback. They know just enough python to write ‘me.time.frame’ into a specify index field on timebase dependent operators.

The section I’m working on deals with external synchronization, so I’ve built a COMP that manages the current playback index.

I could tell the developer to replace his references to ‘me.time.frame’ with op(‘floTime/timeCHOP’)[‘index’] which is ugly and confusing.

Instead, on my COMP I use an Extension Definition, create a new property called ‘Index’, set it equal to a reference to the channel on the CHOP I want (ie: “self.ownerComp.op(‘timeCHOP’)[‘index’]” ) and create a global OP shortcut. So the artist can instead just use ‘op.floTime.Index’ and get the value that way.

In my opinion Python is very useful for all the libraries.
I don’t have a specific use case scenario in my head at the moment but I can guarantee that using the right library and a handful of lines of very basic python saved me from building a very complex network made of operators.

There was a topic going around in this forum not long ago about useful python libraries (or something like that, I’ll see if I can find it).
If you read what some of those libraries can do you’ll realise that you will need very complex operators networks to achieve the same results.

And very complex occasionally means hard to troubleshoot, hard to scale up, hard to implement…

here it is

Thanks for digging up that what’s-you-most-useful-py-libs discussion. In that thread let’s continue discussing specific libraries and their usefulness with TD.

And leave this thread for the original general topic of python in TD.