Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Dear community,
this question has been forked from Cinema 4D locks up, when opening dialog from MessageData.CoreMessage. The author of the question has been @a_block.
This may already be considered off topic, let me know, if I should open a separate thread. Could you provide a bit more info on how the Plugin ID parameter is used by GeDialogs? I mean, the golden rule seems to be, when you open a GeDialog from a CommandData, the CommandData's plugin ID gets passed here. Fine. But what if not? If a GeDialog gets opened from another GeDialog? Or like in my case from a MessageData? Is passing zero ok? Is passing a unique plugin ID, registered only for this purpose ok, even if it is not related to a registered CommandData? One thing C4D seems to use the ID for is to store size information. Which can already be a bit annoying, if like in my case, this dialog is used as a requester with varying content, because once it was opened with some more content, it will remain large, even when displaying less content later on. But ok, that's just cosmetic (though I was thinking to register a bunch of plugin IDs to mitigate this issue). But I could imagine the plugin ID to be used for more serious stuff as well. Like managing contexts or event loops. So long text, short question, can I do harm with this plugin ID?
Cheers, Ferdinand
Hello @a_block,
thank you for your question. To clear a few things up for me (and possible future readers). When you talk about Plugin ID, I would assume that you mean the argument pluginid passed to GeDialog.Open and GeDialog.Restore, right?
pluginid
GeDialog.Open
GeDialog.Restore
So, you are probably aware of this, but other readers might be not, GeDialog is only the public facing front end of Cinema 4D's dialog GUI. There are other types involved in the back end, but what is happening when you call GeDialog.Open(), is:
GeDialog
GeDialog.Open()
undefined
Noteworthy seems:
CommandData
ComandData
Since this is related to the other topic: You could try to make the id for the second dialog specific, but I doubt that this will change much (I have not tried though), since Cinema handles the case of pluginid == 0. I hope this clarifies things.
pluginid == 0
PS: That I wrote seems in some case was intentional, since the underbelly in Cinema 4D has gotten quite complex and making absolute states can be hard sometimes.
Hello Ferdinand,
yes, I was talking about the plugin ID argument of GeDialog.Open() and Restore().
Restore()
Thanks for your explanation.
I'm completely fine with your answer, despite some seeming here and there. I do understand the problems a codebase grown over decades can cause for answering such questions definitely. Nevertheless your explanations largely sync with my expectations from quite a few experiments.
Regarding the mentioned issue of the other thread, I can acknowledge, the plugin ID parameter did not seem to have influence on the issue in my experiments. This question here was really more targeted the sizing issues I have with requesters of varying content. And your answer provides me with some confidence, I can make use of different plugin IDs (I should probably rather say unique IDs from Plugin Café) even if they are not related to any registered plugins at all. While I had already thought so and did not find any issues with this practice, it's always a bit hard to know for sure from the outside. And there's always this feeling one could be doing something harmful, which will only bite at the worst possible point in future.
Thanks for the clarification.
Cheers, Andreas