10

Trying to get the DOM / COM Object Model of Adobe After Effects in Python, so I can manipulate / script various parts of the application. This is possible, on other Adobe applications, as demonstrated here: (https://github.com/lohriialo/photoshop-scripting-python, https://github.com/lohriialo/indesign-scripting-python).

After looking in COM Object Viewers, I still have not worked out After Effects COM ID.

Thus ideally would be able to load, the DOM, with code similar to this:

import win32com.client
app = win32com.client.Dispatch('XX')

Where XX would be something like AfterEffects.Application,

Thank you so much everyone for helping, the library I'm putting together once this troubling problem is solved; can be found here: https://github.com/samholt/after-effects-scripting-python

Best,

Sam

CodexAres
  • 133
  • 1
  • 8

2 Answers2

1

After Effects doesn't seem to appear into COM objects list.

You can get the list thanks to this command:

Get-ChildItem HKLM:\Software\Classes -ErrorAction SilentlyContinue | Where-Object {
$_.PSChildName -match '^\w+\.\w+$' -and (Test-Path -Path "$($_.PSPath)\CLSID")
} | Select-Object -ExpandProperty PSChildName

(source : win32com.client.Dispatch Class Label )

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
1

After few days of research I wrote and shared a script on GitHib which can offer you other perspectives.

https://github.com/kingofthebongo/AE_PyJsx

That's not exactly what you/we are looking for. But it's a way to avoid the problem and use python to manage After Effects. While awaiting a better solution with COM Object Model ID.