Views
541
Replies
1
Status
Closed
Hi, I developed a Photoshop OLE-Automation to open a picture document. Now I want to set paths (workpath and clippath an other) in this picture. These paths were exported with a Plugin. My problem is: How should I do the automation? Which classes, keys and events are necessary and in which order do I have to set the values? Note: A path can have lines or curves and also subpaths.
Do I have to select first the regions (as bezier-curves)? Or can I set the path immediately?
Please help …
CU
Markus
————————————————-
An example to set an selection as polynom is easy:
IActionDescriptor descriptor, pointDesc, listDesc, result; IActionList list;
IActionReference reference;
reference.AttachDispatch( m_PSApp.MakeReference() );
descriptor.AttachDispatch( m_PSApp.MakeDescriptor() );
pointDesc.AttachDispatch( m_PSApp.MakeDescriptor() );
listDesc.AttachDispatch( m_PSApp.MakeDescriptor() );
list.AttachDispatch( m_PSApp.MakeList() );
reference.PutProperty( phClassChannel, phKeySelection ); descriptor.PutReference( phKeyNull, reference );
// add the list of points
pointDesc.PutUnitDouble( phKeyHorizontal, phUnitPixels, 10 ); pointDesc.PutUnitDouble( phKeyVertical, phUnitPixels, 10 ); list.PutObject( phClassPoint, pointDesc );
pointDesc.PutUnitDouble( phKeyHorizontal, phUnitPixels, 10 ); pointDesc.PutUnitDouble( phKeyVertical, phUnitPixels, 100 ); list.PutObject( phClassPoint, pointDesc );
pointDesc.PutUnitDouble( phKeyHorizontal, phUnitPixels, 100 ); pointDesc.PutUnitDouble( phKeyVertical, phUnitPixels, 100 ); list.PutObject( phClassPoint, pointDesc );
listDesc.PutList( phKeyPoints, list );
descriptor.PutObject( phKeyTo, phClassPolynom, listDesc ); descriptor.PutBoolean( phKeyAntiAlias, true );
play the event and get back the result
result = psAControl.Play(phEventSet, descriptor, phDialogDisplay);
Do I have to select first the regions (as bezier-curves)? Or can I set the path immediately?
Please help …
CU
Markus
————————————————-
An example to set an selection as polynom is easy:
IActionDescriptor descriptor, pointDesc, listDesc, result; IActionList list;
IActionReference reference;
reference.AttachDispatch( m_PSApp.MakeReference() );
descriptor.AttachDispatch( m_PSApp.MakeDescriptor() );
pointDesc.AttachDispatch( m_PSApp.MakeDescriptor() );
listDesc.AttachDispatch( m_PSApp.MakeDescriptor() );
list.AttachDispatch( m_PSApp.MakeList() );
reference.PutProperty( phClassChannel, phKeySelection ); descriptor.PutReference( phKeyNull, reference );
// add the list of points
pointDesc.PutUnitDouble( phKeyHorizontal, phUnitPixels, 10 ); pointDesc.PutUnitDouble( phKeyVertical, phUnitPixels, 10 ); list.PutObject( phClassPoint, pointDesc );
pointDesc.PutUnitDouble( phKeyHorizontal, phUnitPixels, 10 ); pointDesc.PutUnitDouble( phKeyVertical, phUnitPixels, 100 ); list.PutObject( phClassPoint, pointDesc );
pointDesc.PutUnitDouble( phKeyHorizontal, phUnitPixels, 100 ); pointDesc.PutUnitDouble( phKeyVertical, phUnitPixels, 100 ); list.PutObject( phClassPoint, pointDesc );
listDesc.PutList( phKeyPoints, list );
descriptor.PutObject( phKeyTo, phClassPolynom, listDesc ); descriptor.PutBoolean( phKeyAntiAlias, true );
play the event and get back the result
result = psAControl.Play(phEventSet, descriptor, phDialogDisplay);
Related Tags
Must-have mockup pack for every graphic designer 🔥🔥🔥
Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.