We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Lily • 5 years ago

Hello Davide.
I need a text description to translate it. Many people do not understand English very well.
Can you make a tutorial UXP-book like Html-book? I'm ready to buy. Thanks.

Davide Barranca • 5 years ago

Just added the transcription! Hope this helps :-)

Lily • 5 years ago

Excellent! Thank you so much, Davide!

Davide Barranca • 5 years ago

Hi Lily, I'll add the closed captions to the blogpost. The UXP book would take 1+ year to write, so I guess it's a bit early for that โ€“ sure enough it is in my plans. For the moment, I've decided to work on this free content (support is always welcome via purchase of my Photoshop extensions) and then work on a React.js course for UXP waiting for UXP to grow.

Ian Barber • 5 years ago

As usual Davide, great information.
Having said that, I am confused about this new UXP.

I have downloaded the Alchemist listener which is great for generating code which can then be placed into the Index.js file of a new UXP Plugin using the batchplay but for example:

On my new UXP Plugin, I have a button which creates a new layer and names the layer "My Layer"

If that button is pressed a second time, how do we now use if() statements to check if that layer name exists like we did in CEP.

I must have searched all 4 corners of the internet looking for UXP documentation to answer questions like this with no success so far.

Ian

Dmitry • 5 years ago

Davide, great video! Many points become clearer when information is presented in a structured way.
I really love ActionManager and actively use it in my scripts. Can you tell us a little more about the new batchPlay? Does it have the same flexibility in getting and assigning parameters as the old ActionManager code?

Jaroslav Bereza • 5 years ago

BatchPlay in general is significantly better than ActionManager as we knew it. But it has some cons:
1) I am still not sure how to execute raw data type
2) fromStream() and toStream() functions does not exists here. Most people never used them but I have some use cases.
3) Executing code with filepaths is more secure but also more obscure at the same time.

Davide Barranca • 5 years ago

Oh I completely forgot about fromStream() and toStream()! This is something that should be addressed in future updates I guess.

difofe • 5 years ago

What about "Generator" plugins?
In CEP it was possible to connect to "native" generator (to generate image assets) or to install your own generator (in Photoshop/generators folder).
Will it be possible to generate images directly from UXP panel (via scripting) or is the Generator still needed for image assets?

Dest • 5 years ago

Just wondering, is there a specific part of React to learn? There is so much, Redux with React Router, Webpack, Hooks, Animations... Gulp. Can you recommend a specific course?

Davide Barranca • 5 years ago

I have plans to record a React.js course targeted to UXP, so I'd recommend that :-)

Damon Bell • 5 years ago

Great video, thank you. One question...... You mentioned that machine learning and imaging will be options for the future. What do you mean by "imaging"?

Kerri Shotts • 5 years ago

Imaging APIs refers to the ability to perform imaging operations, such as crops, transforms, filters and the like easily from UXP code. Essentially a performant way to get at and modify the pixels on a document.

Damon Bell • 5 years ago

Thanks for the clarification.

Davide Barranca • 5 years ago

Damon, FYI Kerri is the Principal PM for UXP at Adobe (I hope I've got the title right!), discard whatever I may have replied if it conflicts with what she says :-) So I still have to cling to my original Generator feat. request for a true pixels setter?

Kerri Shotts • 5 years ago

Thatโ€™ll be part of the imaging apis too. :-)

Davide Barranca • 5 years ago

Imaging means (as far as I understand) get/set pixels via Scripting. Which would be another hallelujah-moment, I've been feature-requesting it for ages โ€“ don't get me started on this ๐Ÿ˜…

Damon Bell • 5 years ago

I was hoping that was what you were referring to. So basically "pixel crunching" to fetch an RGBA array from the layer, do some math, and then import the array back to the layer. Is that correct?

Davide Barranca • 5 years ago

That should definitely be it! I was feature-requesting it on Generator (as we already have the getter, it would have made sense to implement a setter too), it looked "easier/more natural" to me. But if Adobe is willing to do so in UXP that'd be even better!

John Stevenson • 5 years ago

Damon and Davide, Maybe I've not fully understood what it is you are outlining here ... but, it's already possible to do some of what you describe. For example, in building diaplacement map images for use with the Displace Filter:
- open three new documents; each the same size, with one transparent Layer,
- Render each one,
- re-render any two of them using whatever additional Filters have appeal that day,
- open a fourth new document,
- export/duplicate the first three separately into the R, G, and B Channels of this fourth document, by choice or randomly, and,
- save the fourth document as a .psd file.
So, this takes me from no pixels whatever to really useful "RGBA arrays". I have this sequence recorded as an Action. (The Action itself includes a reformulation of the old and forgotten Channel Mixer). Each initial result is unique. Subsequent editing is of course possible. Is this the type of scheme you envisage for a UXP-based Plugin?

Davide Barranca • 5 years ago

I guess we were talking about:
1. getting the pixel data as some sort of Array of [R, G, B] values โ€“ even a linear array, e.g. [[0,0,0], [255,40,128], ...] (this is already possible through Generator), so that
2. you can do any math on the array (flip each other pixel value, implement whatever fancy image processing algorithm) and mostly
3. set the pixels back, i.e. on a per pixel basis assign back the RGB values from the Array. This, I've been told, was possibly in the plans, but these plans never turned into reality.

John Stevenson • 5 years ago

This is excellent Davide. I'm sure it will be much appreciated by the developer community. And you sound enthusiastic about the scope and challenges of "the UXP-project(s)-at-hand". I only found Alchemist just a couple of days ago, but, after some inital escapades, think that it is indeed a very helpful toolkit. My recommendation would be to cover it in-depth in one of the forthcoming episodes here.

Davide Barranca • 5 years ago

That's a great suggestion, thanks John!