Copy link to clipboard
Copied
I'm starting to learn Photoshop python scripting and can't figure out the following:
when I need to use some of the Photoshop Classes, I use for example:
solidColor = win32com.client.Dispatch("Photoshop.SolidColor") # import SolidColor class
but how can I import photoshop Enumerations, such as FontSize, BlendMode etc.?
I always end up with error: ".... not defiend" when trying to use Enumerations like: BlendMode.OVERLAY.
Could somebody please show any example of Photoshop Enumerations importing?
Copy link to clipboard
Copied
When working with Photoshop scripting in Python using win32com.client
, enumerations like BlendMode
or FontSize
are not directly available in the same way as classes like SolidColor
. These enumerations are part of Photoshop's scripting environment and are accessed differently.
In Python, you typically need to reference the enumeration values explicitly as their integer constants or use the win32com.client.constants
object to access them dynamically.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now