![]() |
| |||||||
| Photoshop Scripting Learning and sharing for all platforms |
| | Thread Tools |
|
#1
| |||
| |||
| Manipulating objects inside a "SMARTOBJECT" ? Hello! I have a PSD doc I have fully created with Photoshop CS3 Extended (Middle Eastern). With a script (or you can suggest another way) - I want to be able to hide all the text layers ("LayerKind.TEXT") in that doc, but most of them are inside smart objects that I have created in order to keep everything clean. Anyway, the code above detects all the smart objects, but how do I access the objects inside those (e.g 'sub-objects') ? And If I'm asking already, maybe anyone knows how do I change the align of a text layer in a doc? The scripting manuals *didn't* offer any keyword/solution This is pretty disappointing to see such a GREAT program lacking such "simple" scripting-keywords/commands. Will be extremly happy if someone here knows the answer(s) ! (: |
|
#2
| ||||
| ||||
| Re: Manipulating objects inside a "SMARTOBJECT" ? Eliran, you can edit smart objects by double clicking on the little icon that gets added to them in the bottom right corner of the thumbnail. Do your edit then save and changes will be applied. I don't know why you are doing your Text layers as smart objects. You say to keep them "clean" but text is treated as a vector and always keeps their sharp smoot edges until or unless you rasterize them. I can't help you much with your scripting action. |
|
#3
| |||
| |||
| My friend, first of all thanks for caring about my posts. Let me make it clear: Instead of using layer groups, I used SmartObjects (what a mistake when I think about it). It's a website design project. Anyway I groupped, in those smart objects, for example, the menu block of the page which includes the menu's graphics and also some "sample" menu text -> as regular text layers. I know how to edit a smartobject with Photoshop's user interface, but don't know how to do this inside a script (I use JavaScript by the way..). When I "export" the PSD file to Fireworks in order to slice & export to HTML, I need to get rid of a few text layer. Why? Because let's say I want some picture, who has text on it, to be shown on the web but I want the text as an HTML text. So I need to hide the text layer in the PSD. .. Try to "flow-read" what I wrote, I hope it's clear |
|
#4
| ||||
| ||||
| Re: Manipulating objects inside a "SMARTOBJECT" ? Hi eliran84 - I think Scripting may be a little way beyond this forum, try here instead I think you may have created a problem for yourself by choosing to use Smart Objects for this. Its very easy to organise your files very well using layer sets, and you can even embed layer sets, scripting is also not quite as powerful in Photoshop as some people would like. But maybe you will still find a solution in the forum I've linked to above. Good luck |
|
#5
| |||
| |||
| Re: Manipulating objects inside a "SMARTOBJECT" ? Yep, the scripting capabilities in Photoshop is weak. It's ok though, because I learned a good lesson now: Be smart - Don't use SmartObjects (should become a slogan) Thanks for trying to help me anyway, I appriciate this! |
|
#6
| |||
| |||
| Re: Manipulating objects inside a "SMARTOBJECT" ? I realize this reply is very late, but I stumbled on your post while searching on how to accomplish the same thing and thought I'd reply with the solution I found. The method to open the contents of a SmartObject for editing is an undocumented action, however you can discover it by using the ScriptListener plugin. You have set a couple of parameter values and then use the executeAction command. After your "if" statement, you'll want to make the SmartObject layer the active layer... docRef.activeLayer = docRef.artLayers[i];then insert the following lines to open the layer's contents... var idAction = stringIDToTypeID( "placedLayerEditContents" );Your script will open the SmartObject just as if you double-clicked its icon in the layer stack. The object's contents are opened as a temporary .psb file, and it then becomes the activeDocument for your script. You may take further actions upon it and then close it (saving changes) to return to your original document. I'm finding SmartObjects to be very powerful, but they're still new enough to be a bit quirky in their implementation. Last edited by Phibbus; 09-08-2008 at 10:47 AM. Reason: code error |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OT: ImageSkill Translucator: new tool for translucent objects extraction | Dm_Cher | Software | 1 | 10-24-2006 08:10 AM |
| Help Turning Clouds into Objects... | mhkitty8880 | Photo-Based Art | 9 | 09-01-2006 09:49 PM |
| Help needed in replacing an object's surface! | Alice | Photo Restoration | 3 | 09-06-2003 08:00 PM |
| Net Objects Fusion 7.0 | beaner | Your Website | 1 | 09-01-2003 02:33 PM |
| Scanning Objects | G. Couch | Input/Output/Workflow | 57 | 05-22-2002 03:43 AM |