Open File in filter

Comments and discussions about 8bf plugins which can be use in various applications like Photoshop, Paint Shop Pro or Photo-Paint
darthg8r
Plugin Newbie
Plugin Newbie
Posts: 1
Joined: Mon Feb 19, 2007 5:34 pm

Open File in filter

Postby darthg8r » Mon Feb 19, 2007 5:36 pm

I'm creating a plugin for adobe photoshop cs2 using the cs2 sdk. It's a filter plugin, and I'm trying to open a new file from code using a browse dialog. Every time I call sPSActionContol->Play, the plugin crashes. Is there an issue with using this object in a filter plugin? Please see the code below:

bool FileSystem::OpenDocument(std::string filename)
{
Auto_Desc descriptor;
Auto_Desc result(false);

sPSActionDescriptor->PutString(descriptor.get(), psapi::_strToLong("phKeyNull"), (char*)filename.c_str());

long phEventOpen = psapi::_strToLong("phEventOpen");
long phDialogSilent = psapi::_strToLong("phDialogSilent");

sPSActionControl->Play(&result, phEventOpen, descriptor.get(), phDialogSilent);

return true;
}

Return to “Photoshop-compatible Plugins”

Who is online

Users browsing this forum: No registered users and 10 guests