photoshop-python-api icon indicating copy to clipboard operation
photoshop-python-api copied to clipboard

如何将图片导入到智能对象图层里面

Open wujiu331 opened this issue 10 months ago • 2 comments

PS中智能对象图层可以编辑, 怎么用程序,操作PS 替换 智能对象 里面的图片

wujiu331 avatar Mar 12 '25 23:03 wujiu331

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

Issues-translate-bot avatar Mar 12 '25 23:03 Issues-translate-bot

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) 试试这个。

WuDuKangBaZi avatar Sep 01 '25 02:09 WuDuKangBaZi