This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import subprocess | |
| import json | |
| def Ffprobe(file_path, quiet=True): | |
| ''' | |
| this function given a valid file path, uses ffprobe to scan the file, and return a lot of data about it. | |
| I'm not entirely sure why this works, because ffprobe is not in my system path in windows generally... | |
| the only guess is that TouchDesigner has this bundled in with it's application, and thus python finds it | |
| via pythons path.. maybe. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # prints the installed python packages pythonically and not via pip/cmd | |
| try: | |
| del sys.modules['pkg_resources'] | |
| except AttributeError: | |
| pass | |
| import pkg_resources | |
| for resource in pkg_resources.working_set: | |
| print( resource ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| I wrote this function because I kept running into the issue of having an | |
| extension function or otherwise in TD be called, but not be sure who was calling it or from where. | |
| This function will give you a full read out of the entire chain of functions that calls this function. | |
| It will format the output to be easily readable as well. | |
| -------------------------------------------------------------------------------------------------------------------- | |
| 0) /Cedars_Workshop/geo_WORKSHOP_ANIMATED/SaxaphoneBlowup/datexec_trigger_state_callbacks : 20 : onCellChange() | |
| 1) /Cedars_Workshop/geo_WORKSHOP_ANIMATED/interaction_status_callback4 : 32 : <module>() | |
| 2) /Cedars_Workshop/Project : 23 : TraceFunctionCall() | |
| -------------------------------------------------------------------------------------------------------------------- |