编程语言/photoshop

来自康健生活
Kangkk​(留言 | 贡献)2021年5月24日 (一) 07:32的版本 (→app.documents[])

引言

 
Adobe ps dom comm

(来源摘自互联网示例,作者 Adobe-CEP / CEP-Resources)

开发流程

开发模式判断

开发模式: development
生产环境: production
测试环境: beta

日志

CEF日志

windows:

C:\Users\365\AppData\Local\Temp\CEP7-PHXS.log

CEPHtmlEngine日志

windows:

C:\Users\365\AppData\Local\Temp\CEPHtmlEngine7-PHXS-18.1.1-net.qihoo.design.extension.log
C:\Users\365\AppData\Local\Temp\CEPHtmlEngine7-PHXS-18.1.1-net.qihoo.design.extension-renderer.log

ScriptingListener plug-in

windows:

C:\Users\365\Desktop\ScriptingListenerJS.log

CEP JavaScript库

API 更改向后兼容。

  • CSInterface.js
  • IMSInterface.js
  • Vulcan.js

ExtendScript

日志

使用 $.writeln() 与 $.write()。

Warning: console 未定义

ExtensionManifest

非常重要

全局参数

app

2017

app

colorSettings: Japan General Purpose 2
// 如果没有打开 ps 文件,则 activeDocument 抛错 
activeDocument: [Document 奇舞团1024.psd]
name: Adobe Photoshop
path: /c/Program%20Files/Adobe/Photoshop%20CC
preferences: [Preferences]
scriptingVersion: 18.1.1
freeMemory: 7533521809
version: 18.1.1
displayDialogs: DialogModes.ERROR
foregroundColor: [SolidColor]
backgroundColor: [SolidColor]
playbackParameters: [ActionDescriptor]
playbackDisplayDialogs: DialogModes.NO
notifiersEnabled: false
windowsFileTypes: 
macintoshFileTypes: 
preferencesFolder: ~/AppData/Roaming/Adobe/Adobe%20Photoshop%20CC%202017/Adobe%20Photoshop%20CC%202017%20Settings
locale: zg_CN
documents: [Documents]
fonts: [TextFonts]
notifiers: [Notifiers]
scriptingBuildDate: Apr 25 2017 00:46:55
recentFiles: ~/Pictures/%E5%A5%87%E8%88%9E%E5%9B%A21024.psd
build: 18.1.1(2017.1.1 20170425.r.252 2017/04/25:23:00:00 CL 1113967)
systemInformation: 
measurementLog: [MeasurementLog]
currentTool: marqueeRectTool
typename: Application
app end: [Document 奇舞团1024.psd]
2021

app.documents[]

backgroundLayer
bitsPerChannel
colorProfileType
colorProfileName
mode
componentChannels
activeHistoryState
activeHistoryBrushSource
activeLayer
activeChannels
info
printSettings
fullName
height
managed
saved
name
path
quickMaskMode
resolution
selection
width
histogram
pixelAspectRatio
xmpMetadata
measurementScale
id
layers
layerSets
artLayers
channels
guides
historyStates
layerComps
pathItems
countItems
colorSamplers
cloudDocument
cloudWorkAreaDirectory
typename
parent

photoshop dom

图层(ArtLayers)

图层组(LayerSets)

ID

 * charIDToTypeID: 从四个字符的代码转换为运行时ID Converts from a four character code to a runtime ID
 * typeIDToCharID: 
 * typeIDToStringID: 
 * stringIDToTypeID: 
charIDToTypeID 示例 示例

debug

chrome 端口调试

错误捕获

Jsxbin

由 ExtendScript Toolkit(ESTK)创建的二进制脚本,该工具用于向 Adobe Creative Suite(CS)应用程序添加扩展。

反编译 Jsxbin 文件

manifest.xml

manifest.xml

开发记录

开题

参考

adobe 参考规范文件