photoshop-python-api
photoshop-python-api copied to clipboard
如何将图片导入到智能对象图层里面
PS中智能对象图层可以编辑, 怎么用程序,操作PS 替换 智能对象 里面的图片
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Title: How to import the picture into the smart object layer
PS中智能对象图层可以编辑, How to use the program to operate PS to replace the picture inside the smart object
doc.activeLayer = layer
replace_id = session.app.stringIDToTypeID("placedLayerReplaceContents")
desc = session.ActionDescriptor()
desc.putPath(session.app.charIDToTypeID("null"), os.path.abspath(image_path))
session.app.executeAction(replace_id, desc)
试试这个。