On 09/11/2016 at 02:07, xxxxxxxx wrote:
Hi,
are we talking about a modal/synchronous or non-modal/asynchronous dialog here?
The first option would be possible, but is (for obvious reasons) not really recommended in NodeData based plugins.
For the second option, there's a little more to it than Niklas outlined. You'd need to store the dialog somewhere (i.E. in a member variable). But you'd also need to make sure, the dialog exists only once (something a CommandData guarantees). You'd have to consider all kinds of situations like copies of the material (CopyTo()) in case of rendering or undo. And you would also have to make sure to work with the dialog from main thread only. We'd recommend to not do this (and have all kinds of stability issues in mind) and rather go a slightly different route, like it is done for example in some of C4D's tags.
Implement a CommandData which is hosting the dialog and then in your MaterialData plugin use CallCommand() in reaction to the button.