Maybe it is possible to run without exectuteAsModal in API 2. So someone please let me know if this is possible. However, it seems it is not possible.
When running using executeAsModal, it doesn’t allow for user dialog interaction using
"dialogOptions": "display". Ideally, API 2 would allow for both executeAsModal and for modeless (same as API 1). That way, when a user dialog interaction is needed, the modeless option can be used.
I have multiple plugins that I can’t convert to API 2 unless there was a way to allow for user dialog interaction.
"dialogOptions": "display" too to allow users to interact with Photoshop user dialogs. So it would be bad to lose this capability.
According to the documentation dated October 2021.
Specialized plugins that rely on the Photoshop menu state, or on other non-modal user interactions while the plugin is running may need to stay with apiVersion 1 until such use cases are fully supported by Photoshop.
Just an update, this is fixed in the 23.0.0 public release. I just tested again and it is working now.
If you get any spare time @ddbell can you show us a quick and dirty example please
OK, I spoke too soon.
It runs fine if you are only using 1 dialog display per executeAsModal function.
However, if using more than one dialog display within the same executeAsModel function then it will freeze Photoshop on the second dialog when it is displayed.
So the executeAsModal function would need split out into multiple executeAsModal functions.
I was hoping to use suspendHistory in a single executeAsModal function and having the entire sequence in one function and one history step. Maybe suspend history would still work across multiple executeAsModal functions. This would not be ideal but if possible it may provide a temporary workaround. I will play around with that next.