Chapter 7: photoshop integration, How smart objects work, The smart objects api – Adobe Dreamweaver API Reference CS5 User Manual
Page 55

50
Last updated 8/27/2013
Chapter 7: Photoshop integration
Adobe® Dreamweaver CS5® facilitates a compact integration with Adobe® Photoshop®. Users can insert Photoshop
images as Smart Objects in Dreamweaver. Smart Objects automatically updates images in Dreamweaver if changes are
made to the original images using Photoshop.
How Smart Objects work
Photoshop images are inserted as Smart Objects in Dreamweaver. The Smart Objects stay linked to the original
Photoshop images. When users edit the image in Photoshop, they view an updated image in Dreamweaver. A Smart
Object has a specific state, mainly resulting from the connection of the web image to its original asset file. Users can
view the status of a Smart Object visually. The sync state of a Smart Object is indicated with the Sync badge.
The Smart Objects API
The Smart Object functions handle operations related to Dreamweaver and Photoshop integration. The functions
enable you to perform the following tasks:
•
Retrieve the state of an image
•
Retrieve the height and width of an image
dreamweaver.assetPalette.canUpdateSmartObjectFromOriginal()
Availability
Dreamweaver CS4.
Description
Enabler: This function checks to see whether a Smart Object, on which we can issue the command "Update From
Original," is selected in the Assets panel.
Arguments
None.
Returns
A Boolean value:
true
if "Update From Original" can be applied to current selection.
false
otherwise.
dreamweaver.assetPalette.updateSmartObjectFromOriginal()
Availability
Dreamweaver CS4.