On 19/05/2015 at 03:20, xxxxxxxx wrote:
I'm working on a Modal Dialog Plungin.
And I whant to change my Plugin-Dialog when a object or a Tag is selectet while the Dialog is open.
I've found thomething in the SDK under "Continuous polling"
But I dont know what and where to insert.
I only need something like:
def something_is_seleced_or_deseleckted(doc) :
something_is_done = False
# here is the dedection....
something_is_done = True
if something_is_seleced_or_deseleckted(doc) :
Thanks a lot
On 19/05/2015 at 08:48, xxxxxxxx wrote:
I did not find 'continuous polling' in the SDK. In any case, modal dialogs are meant to block all other UI to inform the user with a message, usually with a warning or error, or to get needed input of some kind before it can continue, especially in terms of accepting other input from the dialog it spawned from. Therefore, what you describe cannot be done with a modal dialog, whether with a messaging system or polling.
To implement more or less what you describe, you must create a asynchronous (or modeless) dialog and make your main dialog send messages to it. The asynchronous dialog will have to have message processing code to handle the updates.
Let me know if you need more info.
SDK Support Engineer
On 19/05/2015 at 14:15, xxxxxxxx wrote:
in the C4D-SDK
at the end of the page I found this:
while gui.GetInputState(c4d.BFM_INPUT_MOUSE, c4d.BFM_INPUT_MOUSELEFT, state) :
if state.GetInt32(c4d.BFM_INPUT_VALUE)==0: break
On 19/05/2015 at 16:15, xxxxxxxx wrote:
You can't interact with anything but the dialog when using a modal dialog.
On 20/05/2015 at 07:48, xxxxxxxx wrote:
The continuous polling you pointed out is for modeless dialogs only. As I already stated and NiklasR also pointed out, a modal dialog cannot receive messages once it's created. Please read the following Wikipedia page for an explanation of modal and modeless dialogs (the later ones are called asynchronous dialogs in the SDK) :
SDK Support Engineer
On 21/05/2015 at 11:20, xxxxxxxx wrote:
i will beleve in you
So I will change to non-modal-dialog!
Thanks a lot.
On 21/05/2015 at 11:30, xxxxxxxx wrote:
Thanks for replying! I'll flag this topic as closed but leave it open for any follow up questions.