Hi @thepetercoin, thanks for reaching out!
This is an interesting question because there is not a straight forward way to do this with scripting, because the option to show or collapse a specific property is not supported by default in after effects.
But I found this similar question in reddit too - https://www.reddit.com/r/AfterEffects/comments/muubs9/collapse_other_properties_with_keyframes_except/
The top comment mentions that you can press S twice quickly to show only the selected properties, I tried it and it works well.
so if we will create an automation that selects all the properties that has keyframes (except the puppet property)
here is an example of such automation -
Select Properties with Keyframes.zip (1.4 KB)
Then we will only have to click S key twice in order to show only these selected properties, and to be able to choose what we want to show programmatically.
For this we will need an extra tool to automate the trigger of S button twice.
Automation Toolkit does not natively supports triggering buttons, so another forum user found a good solution for this in other post -
In his post he wanted to click the ok button automatically in the autotrace window when it opens, so he used an app called AutoHotkey, you can create simple scripts and run them from the automation, this software will run the script and simulate the Keyboard clicks.
the AutoHotkey script to click the S twice should look like this -
Send, s
Sleep, 10 ; Wait 10 milliseconds (0.01 seconds)
Send, s
ExitApp ; Exits the script after sending the keys.
very simple script as you see.
- so you need to download AutoHotkey if you use windows (for mac we will need to find something else).
- create this script file.
- run this script file from within the automation after selecting the properties.
you can run the file by creating a file variable, then you can embed the script file into the automation, to save the content of file in the automation instead of only the path to the file on the computer that could change(just click the embed checkbox), or you can just select the file path to the the script file, then you can use the file action “open” to run this file.
Example-
I know it is a lot of information but the process is quite simple. Please let me know if you need more help.