This file contains 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 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