Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import json
# import TouchDesigner JSON modules
TDJ = op.TDModules.mod.TDJSON
# list comprehension to narrow our scope to only the custom page we want
target_page = [page for page in op('base_example').customPages if page == 'Test']
# convert pars into json
json_page_pars = TDJ.pageToJSONDict(target_page[0])
# pretty print our json
pretty_pars = json.dumps(json_page_pars, indent=4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment