i have cmyk document opened in photoshop. in "channels" panel, added 2 spot colors same name "sport color 1".
as click of spot channel select it, "listener" plugin output c++ code below:
sperr playeventselect(/*your parameters go here*/void)
{
     piactiondescriptor result = null;
     descriptortypeid runtimekeyid;
     descriptortypeid runtimetypeid;
     descriptortypeid runtimeobjid;
     descriptortypeid runtimeenumid;
     descriptortypeid runtimeclassid;
     descriptortypeid runtimepropid;
     descriptortypeid runtimeunitid;
     sperr error = kspnoerror;
     // move top of routine!
     piactiondescriptor desc0000000000003980 = null;
     error = spsactiondescriptor->make(&desc0000000000003980);
     if (error) goto returnerror;
          // move top of routine!
          piactionreference ref0000000000001a48 = null;
          error = spsactionreference->make(&ref0000000000001a48);
          if (error) goto returnerror;
          error = spsactionreference->putname(ref0000000000001a48, classchannel, "spot color 1");
          if (error) goto returnerror;
     error = spsactiondescriptor->putreference(desc0000000000003980, keynull, ref0000000000001a48);
     if (error) goto returnerror;
     error = spsactioncontrol->play(&result, eventselect, desc0000000000003980, plugindialogsilent);
     if (error) goto returnerror;
returnerror:
     if (result != null) spsactiondescriptor->free(result);
     if (desc0000000000003980 != null) spsactiondescriptor->free(desc0000000000003980);
     if (ref0000000000001a48 != null) spsactionreference->free(ref0000000000001a48);
     return error;
}
-------------------------------------------
you can see "putname" add channel name "spot color 1" reference, , think not work correctly if add such code project since ps cannot differentiate 2 channels name. can tell me if there's other method selecting spot channel? in advance.
spapi oserr(*  putindex )(piactionreference ref, descriptorclassiddesiredclass, uint32 value)   puts index reference ( formindex) along desired class reference. 
 More discussions in  Photoshop Plugin and Companion App SDK         
adobe
 
  
Comments
Post a Comment