Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Plugin and Companion App SDK
Viewing all 54282 articles
Browse latest View live

Category { "**Hidden**" } works for plug-in on 32 bit hosts but fails on 64 bit hosts - Alternative?

$
0
0

I am experimenting with a simple plug-in that is supposed to execute a single specific task in combination with a PS panel.

So the panel's interface is written in Flex which calls my plug-in via jsx (PS scripting) and transfers some parameters that can be configured on the panel to the plug-in via its scripting capabilities - so far so good. The actual PS filter plug-in used in this shall only be executable in this way and I'd thus like it not to show up in the Filters menu at all.

 

I have been trying the solution suggested in this thread: http://forums.adobe.com/message/3854157#3854157

 

To summarize I specified "Category { "**Hidden**" }" in the plug-in's .r file and was subsequently still able to call the plug-in by means of jsx using its plugInUniqueID and jsx functions like stringIDToTypeID() and executeAction(). Anyway, that worked fine in 32 bit PS on the PC (I tried CS4 & CS5). I didn't build this on the Mac and its various platforms yet as it failed on the PC in 64 bit PS (I again tried CS4 and CS5).

 

The problem on the 64 bit hosts seems to be that as soon as I specify Category { "**Hidden**" } the plug-in does not get loaded anymore. If I make it visible in the menu it works fine but as soon as I make it hidden it can't be accessed by jsx plus the debugger says that no symbols were loaded for my source files when trying to set break points.

 

So obviously the Category { "**Hidden**" } solution does not work on all platforms.

 

Is there an alternative approach to this?


Path to Photoshop Plugins/Panels Assets Folder

$
0
0

I am one of those who is scrambling to recreate a panel that was made in Configurator to HTML5 so please bear with me.

 

For a javascript I am trying to find the path to a file in the "assets" folder within my panel for both Mac & Windows. I want the path to open a specific file. Here is the base code:

 

function selLss1(){var idOpn = charIDToTypeID( "Opn " );

    var desc176 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

    desc176.putPath( idnull, new File( "/assets/file.psd" ) );

executeAction( idOpn, desc176, DialogModes.NO );

}

 

"/assets/file.psd" is the file and I need to know how to tell Photoshop how to find and open this file in Mac's and Windows.

 

Thanks in Advance - Sam

Storing arbitrary plugin data in a PSD

$
0
0

Hi.

 

I have an automation plugin that's accessed by a html5 extension acting as the UI. I'd like to store data related to the plugin in the PSD file itself. I looked around for ways of storing some type of metadata, but didn't find any working solution. I tried looking into the Resource Suite, but it seems that's not available in an Automation plugin.

 

My aim would be to be able to read, store and modify data that is moved along within the PSD file. A simple example of what this would be used for is document version information that gets automatically updated on each call to the plugin. There are several other use cases, so a special case of just making versioning work would not be sufficient. The data needs to be displayed  and made editable through the html5 UI.

 

Is there any way to do this?

 

Thanks in advance,

Barna

Not able to call my filter plugin (Hidden.cpp) when there is a group in the document.

$
0
0

I have no idea why I the `AutomationFilter` plugin is not triggering the Hidden plugin whenever I have a group folder in the document.

 

Ghx6sUO.png

 

I'm calling my Hidden plugin with: sPSActionControl->Play(&result, hiddenEventID, descriptor.get(), plugInDialogSilent);

and works every time I don't have a group folder in the PS document...

 

Returning error when trying to Play my plugin (--25920):

 

r5xttMx.png

 

Update:

I've since found out that it's a: 'errEventNotAvailableDefine' So is it possible to have a group in the PS doc?! I understand it's looking for the properties of pixels but to not even allow you to run a filter plugin is stupid!

Is there a fix for this?!

 

Thanks!

Photoshop CS2 Not Enough RAM error message (wrong forum)

$
0
0

For some strange reason, my copy of Photoshop CS2 (macintosh) has started giving me an error message after program start up: could not complete your request because there is not enough RAM. I don't have to do anything. This message pops up about 1 minute after I start the program. The program works fine. I just close the window and go on. I haven't installed any new plug ins or changes to my prefs or hardware configuration. This just started for no apparent reason. It doesnt't refuse to work, it's just annoying. I've tried deleting the Photoshop prefs file and reinstalling the program from the master disc. Didn't help. I'm running OS 10.4.2 on a dual 1.8 gz processor mac with 4 gigs of RAM; Photoshop set to retain 60% of that. Anyone with any ideas about this, or should I just quit whining and go back to work...

Multiple plug-ins in one file (CodeCarbonPowerPC)?

$
0
0
I'm trying to put 3 plug-ins in one file.
Very simple on Windows (3 PiPL resource blocks with different entrypoints).
And don't worked on PowerPC:

CodeCarbonPowerPC(0,0,"") <-- what is last parameter (string)?

Any example?

Thanks,
Ivan Kharin

VBA code to import scanned images into Photoshop CS2 with TWAIN

$
0
0
Hi,

I have to develop a solution that automates the scanning of an image using the TWAIN driver interface. Once scanned, the image appears as a new document in Photoshop where it will be further processed using VBScript scripts.

The solution so far :

Using the freeware 'EZTW32.dll' (copied into C:\WINDOWS\System\), I am able to open the TWAIN scan dialogue on screen, using the function 'TWAIN_AcquireToClipboard(Me.Hwnd, nPixTypes) from the 'EZTW32' dll.

Once the image is scanned, the TWAIN driver is automatically closed, leaving the scanned image on the Windows clipboard.

I then launch Photoshop CS2 using a shell code :
(It is important that Photoshop runs minimized)

Dim strPathname As String
Dim lngShellReturn As Long
Dim appRef As Object
Dim newDocRef

strPathname = "C:\Program Files\Adobe\Adobe Photoshop CS2\Photoshop.exe"

lngShellReturn = Shell(strPathname, vbMinimizedNoFocus)
Set appRef = CreateObject("Photoshop.Application")

When Photoshop is running, then a new document is created and the scanned image is pasted into the document from the Windows clipboard...

Set newDocRef = Documents.Add(8.268, 11.693, 600, "New Doc")
newDocRef.Paste

OK, this works up to a point. The newly scanned image appears automatically in Photoshop.

The big problem is that when the user makes a change in resolution or draws a selection box in the TWAIN dialog, this data is not recovered from TWAIN, so the image size parameters in the new document cannot be set.

A beter solution would be to write code that emulates the menu commands in Photoshop CS2:

File -> Import -> [Current Scanner]

that launches the TWAIN driver for the current scanner (the code must close TWAIN immediately after scanning). In this case, the resolution and image selection parameters are also imported into the new document.

I am currently refering to the Photoshop CS2 SDK. Do I need to request the Advanced SDK ?

Once beyond this point, then I think I can continue the image processing routines using VBScript as per the SDK.

Any help or other pointers to the TWAIN problem would be VERY APPRECIATED !

Lars

Counting Layer Comps

$
0
0
I'm finally up and running with a basic skeleton of code. I've counted the number of layers (using keyNumberLayers) in a document, etc.

Now I'm stuck again-- I'm trying to count the number of Layer Comps. I thought this would be something easily available in classDocument, but I don't see any such thing.

How would someone go about doing this?

Plugin to write custom TIFF tags while saving TIFF images (pointers needed)

$
0
0
Hi -

I'm thinking of introducing custom TIFF tags into my TIFF images -- within Photoshop and I'd like Photoshop to save the TIFF images with the custom TIFF tags. How would I go about doing this?

Thanks

- Olumide

OLE via Perl and Photoshop Help please

$
0
0
I'm writing some automation for Photoshop, and using OLE provides me all the access I need. However, I'm running into a difficulty with getting the correct "handles" from OLE.

Here's a snippet of my perl code.

use strict;
use Win32::OLE qe(in with);
use Win32::OLE::Const 'Adobe Photoshop';
use Win32::OLE::Variant;

my $Photoshop = Win32::OLE->GetActiveObject('Photoshop.Application') ||
Win32::OLE->new('Photoshop.Application)
or die "Please start photoshop first\n";
my $descriptor = $Photoshop->MakeDescriptor()
or die "Could not MakeDescriptor\n";

My code winds up calling the die "Could not MakeDescriptor".

Using Perl's OLE Browser, it seems that when I create the $Photoshop variable, I'm getting access to the OLE Object "Application" which has function calls similar to the File menu in Photoshop. This works well for me, but there's no function "MakeDescriptor" in that object.
One part of my code needs to use the descriptor to be able to set variables like the background color, and the sample code shows using this.

It seems that what is 'expected' by the OLE->GetActiveObjet or OLE->new is listed in the OLE Browser as an Adobe Photoshop Type named "PhotoshopApplication" which /does/ have a MakeDescriptor function returning an IActionDescriptor object.

How do I get that PhotoshopApplication type from the Application Object, or how do I get the Descriptor from the Application Object, or from OLE directly so I can have access to both?

Resizing tiff files without resample option in Photoshop SDK

$
0
0

Hi,

 

We am facing the below issue with Adobe Photoshop CS2.

 

We are trying to automate resizing of TIFF files in Photoshop using SDK. We were able to achieve this perfectly by defining in terms of percentage but when we try to do the same using without resample option programmatically, we are facing difficulties because with this option SDK allows us to pass the values in terms of Resolution only. We also tried to put a formula to compute the resolution to resize the image to a desired width but the formula does not yield a perfect result at all times.

 

Can anyone please let us know if there is any formula to resize an image to a desired size by passing the value in terms of Resolution or probably guide us where we can find help to resolve this issue.

 

Thanks & regards,

Rajeev

Accessing Pixel data of PSD layers by name

$
0
0

Hi! Can someone explain basic steps how can i get access to pixel data of PSD document ?

 

What i want to do is:

 

1) Function to create blank layers with specific names and arrangement

 

2) Function to get pixel data of those layers and exporting that data to files

 

My problem more speciffically is that im making game developlent tool that must combine information found in different layers painted by artist and combining multiplie channels of different layers together and at least exporting them to different bmp or png files for later use (converting to dds format in nvidia command line dds tool - if that cant be called from plugin) Idea is that i could have something like 6 layers and different channels from those layers is combined together, extracting total of ~6 channels to be put in two images for later converting to dds.

 

I could use COM, but i can not find any documentation about how to get that simple data i need. Basically just get layer by name + combine some channels of those layers and export to any file, i could even save them to some kind of my raw format and process them later in my programm.

 

Any help is very much welcome, matter is ugent

Initial directory for openDialog

$
0
0

Hi,

 

I was wondering if it's possible to set an initial directory for the File.openDialog() function - like we can do for the Folder.selectDialog().

The File.openDialog() function keep the last folder in memory, but I would like to set an initial directory for the first time I click on my browse button.

 

Thanks

Application and Plugin paths (32 vs 64 Windows)

$
0
0

I am working on a version of our plugin installer that needs to put the 32bit windows plugin in the 32bit Photoshop plugins folder and the 64bit plugin in the 64bit Photoshop plugins folder.

 

Currently our 32-bit only installer uses the Windows registry to locate the plugins directory.  (HKEY_LOCAL_MACHINE/SOFTWARE/ADOBE)

 

Looking there now I see that even though I selected both CS5-64 and CS5-32 when I installed Photoshop, there is still only one entry for the plugins path.  But there are two separate plugins folders.

 

Worse still Adobe seems to have changed the organization over time.

 

For CS4 both versions are in the "Program Files" directory.

 

For CS5 the 32bit Photoshop directory is in "Program Files(x86)".

 

In changing the installer to support 32 & 64 I'd like to know what the best practice is for locating these plugin folders so I can check for their existence (since it's possible to install only 32 or 64 rather than both) and then put the right plugin in the right place.

 

Right now it's quite nice:

 

  get plugins path from registry

  install there

 

I hope I don't have to implement trial and error, such as:

 

  start in plugins path from registry

  go up one level and look for other photoshop folders

  go up another level and see if there are other program files folders

  recurse into them looking for Photoshop folders

 

If there is no better way, could the lack of a second registry entry be considered a bug?

3dSimpleModeler and Scene Coordinates

$
0
0

When a person creates a 3d layer from a mesh preset such as the cone or loads an obj file, then Scene is always coming in translated.  Click on Scene and check the Coordinates.  In the case of the cone, the Scene has coordinates [260.2, 260.2, 0].

 

I am not seeing how to get or set those values in a 3d filter, anyone?


Delay Photoshop redraw

$
0
0

This from the AutomationFilter example causes Phohtoshop to redraw.

 

//-------------------------------------------------------------------------------

//

//          AutomationFilterData::Redraw

//

//          Tell Photoshop to redraw everything.

//

//-------------------------------------------------------------------------------

void AutomationFilterData::Redraw(void)

{

          Auto_Desc descriptor;

          Auto_Desc result(false);

          AFERROR(sPSActionDescriptor->PutEnumerated(descriptor.get(), keyState, typeState, enumRedrawComplete));

          (void)sPSActionControl->Play(&result, eventWait, descriptor.get(), plugInDialogSilent);

}

 

I'm looking for a way to tell Photoshop to postpone redrawing until I'm ready for it to start updating again.

 

The issue is that my plugin does LOTS of copying and pasting of layer data, and with Photoshop

redrawing after every command, the plugin can take minutes to finish even though the underlying

algorithm is finished in milliseconds.

 

The interesting thing is that on Mac it seems as if Photoshop redaws much less frequently than on

PC.  I'll see a document with hundreds of layers complete in 10-15 sec on Mac where the PC would

take ~3 minutes on similarly capable hardware.

 

On Mac it seems to be drawing only as fast as it can keep up with the plugin's execution.  On PC it

seems like somewhere the code example above is being called (it's not, I only show it for example)

and it's redrawing after every operation, and not moving on until the redraw is complete.

 

Any thoughts?

Which layer is the target layer?

$
0
0

How can I determine which layer among those in the ->layersDescriptor structures corresponds to the target layer?

 

In photoshop cc x64 pc

 

-- all the read channel numbers seem to be unique

-- all channels have ->target=1

 

(edit after more work with layersDescriptor)

 

the information presented has a lot of errors and omissions, such that it's impossible

in principal to display layers the same way as photoshop does.  Invisible "pass through"

layers are listed as visible.  Layers with "stroke" special effects are indistinguishable

from normal layers.

How to make plugin that works in background?

$
0
0

Hi, I need to make plugin that works in parallel thread in background. It must start when Photoshop is started and stop when Photoshop is closing. I think that the plugin type that I should choose is "Automation" but these plugins are executed only when user is invoking corresponding plugin from menu. How to make plugin that is running when photoshop is running without need to invoke it manually? I don't want this plugin to be visible in any menu. This plugin is designed to work along with CEP extension.

DDS plug-in for Photoshop 7

$
0
0

i am running an older version of adobe photoshop.  i have adobe photoshop 7.0.  i need a dds plug-in and i can't find the one i need.  i was hoping someone could send me a link to the right page.  i would so appreciate it.

 

[Title edited for question clarity and future forum search... Mod]

open/edit/save psd file in my own developed application

$
0
0
Hi all,
I would like to confirm about:
Do I violate Adboe Macromedia license if I develop a independent desktop application allowing open/edit/save psd file right in my own developed application? (support psd file version is up to CS4).

thanks and regards
Viewing all 54282 articles
Browse latest View live