It sounds like to me your trying to populate a template that has smart object layers you want to replace with different images. One of the problems there would be that the replacement images need to be the same size as the original object. For there is an associated transform associated with all smart object layers that are not replaced or updated when the smart object layers object is replaced. If the replacement is not the same size as the original the associated transform will not be correct for the replacement.
I have never programmed an Adobe bridge script. I know nothing about BridgeTalk interface or how you would pass both images file and template to the script in Photoshop of if you script would expect the template to be open in Photoshop in the first place. Your description of what your are doing in the action is a bit vague. You mat need to add an additional option to the Bridge's Tool menu.
If you are trying to populate a template you may want to look at my collage populating scripts in my package. There is a video of 5 images being populated.
Photo Collage Toolkit
Photoshop scripting is powerful and I believe this package demonstrates this A video showing a 5 image collage PSD template being populates with images:
The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
- Size the photo collage templates for the print size you want - width, height and print DPI resolution.
- Photo collage templates must have a Photoshop background layer. The contents of this layer can be anything.
- Photo collage templates must have alpha channels named "Image 1", "Image 2", ... "Image n".
- Photo collage templates layers above the background layers must provide transparent areas to let the images that will be placed below them show through.
There are fifteen scripts in this package they provide the following functions:
- HelpPhotoCollageToolkit.jsx - Online Help
- TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
- CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
- LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
- InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
- ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
- ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
- PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
- BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
- BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
- PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
- BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder. Images Rotates for best fit.
- BatchPicturePackageNoRotate.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder.
- PopulatePicturePackage.jsx - Used to Automatically populate a Photo Collage template Fill with the same single image and leave the populated copy open in Photoshop.
- PCTpreferences.jsx - Edit This File to Customize Collage Populating scripts default setting and add your own Layer styles.
JJMack, I'm trying to create a panel from Photoshop CS6 / CC facing diagramming albums and to facilitate my work flow that would be fundamental.
Of all the tools that test, he walked closer to the suit my needs was the 'ReplaceCollageImage' .It Too bad he only replace an image. There is a possibility of him replacing at least 5 images ???
You would need to design the process for which "layers" need to have their object replace and then code a custom script. My ReplaceCollageImage script does not actually replace the smart object layer object. It actually replaces the current target smart object layer with a new Smart Object layer that is sized, masked and position to where the original smart object layer was sized, masked and positioned. The replacement image can have any aspect ratio and size. The original smart object layer is deleted so the document structure is not changed.
The populating scripts can populate any number of images into a copy of an empty template PSD file. So you may be able to create a template for your panels and populate all the required images with one of the populating scripts. There is however, a limit to the number of images a template can support. That limit is 53 images.
And what would this escipt?
And what would this escipt?
With your help I will try another solution: I will create four shares, one share for each situation, for example, (Option A-2 insert images, Option B insert 3 images, Option C - 6 insert images and insert Option D 8 pictures) You could write a script that opens a dialog box with these four options (a, B, C and D) ?. By choosing one of these four options, the corresponding action is taken.
I believe in your head you know what you want to do. From what you posted all is see is a panel (actually a script dialog) which has four buttons that relates to four actions in an action set in the action palette. A script like that would fail if the action set is not loaded into Photoshop. If the Action set is loaded into the actions palette all you would need to do is put the Action palette into button mode and your would have your for buttons to play those four actions. IMO there is no need for you to add an additional panel an extension into Photoshop.
With my populating "scripts" it is the template design that sets the number of images to be populated. Scripts can use logic actions can not on their own. It only requires a single script to be able to populate a variable number of images. Actions need to be recorded for a specific number of images. You need an action for the number of images you want to populate. In your case 2, 3, 6 and 8 you require four Actions. That is why I stopped recording actions for image population and turned to scripting. My template design can handle 1 to 53 images. It was not my intention to only handle 53 images. My template design uses alpha channels to map each image location size and shape. When I create my template design. I was not aware that Photoshop only supported 53 alpha channels. I knew that Photoshop supported up to 8,000 layers and each layer could have a layer mask. Alpha channels are like layers mask they are selections. I never dreamed that Photoshop limit on alpha channels would be as small as 53.
IMO all you need to do is create template PSD files for your different album page layouts and use my scripts to populate these. The results will be layered documents you can embellish using you Photoshop skills. Look at the video again. There are others included in the documentation.
Templates compatible with my scripts are easy to create. The a very simple PSd files.
You're right JJMack! For script if I can call action on the panel
Rei_Martins, was inspired by this plugin I'm trying to create my panel for creation of my albums.
We are working in an upgrade with English and Spanish languages and some new function.
One of these function is "Insert Images" in "Smart Objects".
There is no problem playing Actions from scripts. Actions can also be converted to a script with xtools and included in the main script so all will be self-contained. There will be no problem like the required action set not being loaded or being modified.
There is a big difference between a Script that has a dialog panel with buttons and a Photoshop Extention that has a panel with buttons. Photoshop Extension Panels are like Photoshop Palettes. They are Part of Photoshop UI independent waiting to be used. Dialog Panels are not like Palette windows the are not independent they are part of a feature, a filter, a plug-in. Photoshop Scripting does not support Palette Windows only Dialog Windows are supported by ScriptUI.
Dialogs are displayed by the feature, plugin, script, Filter, etc when it is in control. When that whatever is in control Photoshop UI is inoperable. The whatever is in control of Photoshop any human interaction possible must be programmed into that whatever. That whatever process needs to complete for Photoshop UI to be usable again any dialog window will be closed. If it does not you will need to terminate it or Photoshop. Dialog windows are not persistent.
I have not done any Bridge scripting. There is some sort of interface between Bridge and Photoshop called bridge talk. Using that and writing Plug-in scripts I'm sure a richer user interface than my simple script dialog for creating albums could be achieved.
However, whenever I thought about creating a photo album. I could not think of a way to automate Image select for the albums pages or how to sequence the images. IMO the only way to create a good photo album is by manually selecting which image should be placed in the album and to order then into the some preferred image sequence. So I use a simple method to organize an album. The usable images are put into a folder in that folder I will create one or more album folders. The album folder will contain subfolders one for each album page. Images, for each the album pages are copied into the album appropriate page folder.
Online album printing sites do a good job at a reasonable price. You may want to read some reviews and see what they require