Creating a new photoshop doc with Python, Part Two
Just a quick update on my previous post about adding a new document to photoshop with python.
Which defines the ruler units as pixels. The lesson... assume nothing! If it needs it, define it.
It seems that Cs2 uses pixels as it's default assumed unit. Due to this, my script previously did not bother to define a unit type for the document and it all worked fine.
I am running some tests of the script on Cs5 and coming up with some unexpected results- namely really massive documents, which are no fun. This is because the document is being made in CM by default rather than pixels.
To fix this, I added in this wee bit o'code:
psApp.Preferences.RulerUnits = 1
Which defines the ruler units as pixels. The lesson... assume nothing! If it needs it, define it.
Comments
Post a Comment