Sub topic 6
Editing the contents of a smart object
This chapter assumes you can work in the Layers panel, know what a smart object is, and have created at least one embedded smart object. It covers how to open a smart object's contents, how saving carries changes back to the parent document, and the errors that most often trip people up.
The working model
A smart object stores its source data separately from the layer you see. The layer in your document is a rendered preview of that source. When you edit the contents, you are not painting on the layer. You open the source, change it, and let Photoshop re-render the preview.
For an embedded smart object, the source is a complete file stored inside the parent PSD or PSB. For a linked smart object, the source is an external file on disk. In both cases the flow is the same:
- You choose Edit Contents.
- Photoshop opens the source in its own document window.
- You change the source and save it.
- Photoshop updates the smart object layer in the parent document.
Transforms, smart filters, layer styles, masks, and blending options live on the parent layer. They are applied again to the updated source, so they survive a content edit.
Opening the contents
There are several ways to open the source. Each one does the same thing.
- Double-click the smart object thumbnail in the Layers panel.
- Choose Layer > Smart Objects > Edit Contents.
- Click Edit Contents in the Properties panel.
Double-clicking the layer name does not work. That starts renaming the layer. Double-click the thumbnail.
What opens depends on the source type:
| Source | What opens | Where the save goes |
|---|---|---|
| Converted Photoshop layers | A temporary PSB document | Back into the parent file |
| Placed image or PSD, embedded | A temporary document | Back into the parent file |
| Placed file, linked | The original file | To the file on disk, then into the parent |
| Placed vector artwork (Illustrator) | The file in Illustrator | Back into the parent after saving there |
| Camera Raw or RAW file | The Camera Raw dialog | Applied when you click OK |
The temporary document for an embedded smart object has a name such as Layer 1.psb. The name is not a real file on your disk, so Save does not ask where to put it.
Saving is what triggers the update
The parent document does not change while you work in the source window. It changes when you save the source with File > Save (Ctrl+S or Cmd+S). The window can stay open, and you can save as many times as you like. Each save refreshes the parent.
This has two practical effects:
- Arrange the two windows side by side, for example with Window > Arrange > 2-up Vertical. Each save then shows its result in the parent right away.
- If you close the source window and choose Don't Save, the parent keeps its last saved version.
Do not use Save As on the source window. Save As writes a new file and breaks the connection to the parent. Later edits in that window will not reach the parent layer.
What you can change inside the source
The source is a normal document. You can paint, add layers, adjust colors, edit text, or apply destructive filters. Several limits matter in practice.
- Canvas size. If you change the source's canvas size, the smart object's bounds change in the parent. The layer may jump in size or position. Resize the canvas only when you intend that.
- Resolution. Changing the source's pixel dimensions changes how it fits the transformed bounds. If you resample the source to a smaller size, Photoshop scales it back up to match the old frame. The result is softer.
- Color mode. Photoshop converts the source's color mode to match the parent when it updates. Mismatched modes can shift colors.
- Layer structure. An embedded smart object made from several layers contains all of them. You can reorder them, hide them, or add new ones. A layer-comp-style setup, where hidden layers act as variants, is a common trick for mockups.
Edit content versus edit the layer
New users often make the wrong kind of edit. Painting on a smart object layer in the parent is blocked. Photoshop warns that the layer must be rasterized first. The decision is simple:
- If the change belongs to the artwork itself, such as a retouched pixel or a changed text string, edit the contents.
- If the change belongs to how the artwork appears in this composition, such as size, position, a filter, or a mask, edit it on the parent layer.
Keeping that split clean is what makes a smart object reusable. The same source can then appear in many places with different transforms and filters.
Editing with scripts
The Action Manager call below does the same thing as Layer > Smart Objects > Edit Contents. Select one smart object layer first, then run it.
// Photoshop ExtendScript: open the contents of the active smart object layer for editing
// (same as Layer > Smart Objects > Edit Contents)
executeAction(stringIDToTypeID("placedLayerEditContents"), undefined, DialogModes.NO);After it runs, the source document is the active document. A script that continues must edit and save that document, then switch back to the parent with app.activeDocument.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Nothing changes in the parent after editing | The source was not saved | Press Ctrl+S or Cmd+S in the source window |
| Edit Contents is unavailable | The selected layer is not a smart object, or several layers are selected | Select exactly one smart object layer |
| The layer shifted or resized after saving | The source canvas size changed | Undo in the source, or restore the original canvas size |
| Edits stopped reaching the parent | Save As was used on the source | Reopen with Edit Contents and edit again |
| A message says the file cannot be found | A linked source was moved or renamed | Relink the layer (see the chapter on linked files) |
| Photoshop warns about rasterizing | You tried to paint on the parent layer | Use Edit Contents instead |
Exercise
Exercise
You double-click a smart object thumbnail, paint a logo correction in the source window, and close the window without pressing Save. What happens to the parent layer, and what should you have done?
Show answer
The parent layer stays as it was, because the update only happens when the source is saved. Press Ctrl+S or Cmd+S (File > Save) in the source window before closing it, and the parent layer re-renders with the correction while keeping its transforms and filters.
Exercise
A colleague used File > Save As on the source window of an embedded smart object, then kept editing. The parent no longer shows the new edits. Why?
Show answer
Save As writes a separate file and detaches the window from the parent document. The parent has no link to the new file. Close it, reopen the smart object with Edit Contents, and make the edits there, saving with File > Save.