Copy link to clipboard
Copied
Hello everyone.
I'm developing a script with support ExternalObject. And I have a big impasse in understanding how kTypeLiveObject works.
(Mac OS, Xcode)
Can me somebody help with this? Hey, guys from adobe, you do not have any examples of how to use it. Help me please, give an example here.
I would be very grateful.
Thanks.
Copy link to clipboard
Copied
Hey guys from Adobe, I'm still here and waiting for your response.
I'll try to describe more specifically the question.
In JS I load the library, create an instance of the class and pass [ActionDescriptor].
For example:
mylib = new ExternalObject ("lib:" + "SampleLib.framework"); // load the library
var calcObj = new CalcPointObj(); // new class instance
var point = points.getObjectValue(cPoint).getObjectValue(_id3); // [ActionDescriptor]
calcObj.inputProperty = point; // [ActionDescriptor] to lib
Inside the library.
Using the indirect method in the class and have the property inputProperty
ESerror_t objectPut(SoHObject hObject,SoCClientName* name,TaggedData* pValue)
{
gpServer->getClientData(hObject,(void**)&pMyData);
if ( strcmp(name->name_sig,"inputProperty") == 0 ) {
pMyData->inputProperty = *pValue;
if(pMyData->inputProperty.type==kTypeLiveObject) { // [ActionDescriptor] here as liveobject
...
I have everything working inside the library I get an object of type kTypeLiveObject, but I do not understand how I can work with this type?
You do not have an example about the objects of type kTypeLiveObject.
Still hope for your answer.
Thanks.
Copy link to clipboard
Copied
This is a user to user forum, not a place to find official Adobe support.
It is also a forum about scripting Photoshop. You may have better luck getting an anwer in another forum. The Photoshop SDK forum maybe.
Copy link to clipboard
Copied
Thanks for the extra detail. I would suggest you pull the information out of the ActionDescriptor in your JSX file. And pass in simple types, strings and numbers, to your library. XBytor has tools that pulls apart ActionDescriptors and converts to XML for example. Getting your library to understand Action* objects will be a lot of work and probably not worth the effort.
Copy link to clipboard
Copied
Hi Tom,
Thanks for the reply.
Yes, I know about this way of solving the problem (Action* to XML).
But I want to achieve maximum effect and pass the object itself (via LiveObject) and not a separate information from it.
I want to get the entire object in the library.
If there is any chance to get an example or other help - I'll take it.
I would be happy to get any example
Thanks a lot.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now