Hello @fwilleke80,
Thank you for reaching out to us. For clarity, you are talking about a shader being created with this menu, right?

I debugged a bit against Cinema 4D to find out more. Other than the more "top-level" menus as they exist for object, material, and tag creation, we are here deep inside the parameters of a node, as this all happens inside the custom GUI TexBoxGui
, or more specifically its internal counterpart, which is used to display such base link parameters for shaders.
When you click on the little popup arrow button, Cinema builds first the popup menu, evaluates the user input, and then sends the data on a gigantic message journey (which I frankly did not step through in its entirety), and at the end the data then comes out as an already instantiated BaseList2D
which is set via TexBoxGui::SetData()
. So, there is no obvious point for me where the message should be emitted, aside from the distant corner in the classic API core where the shader, which is then finally set, is actually being instantiated. TexBoxGui
, the initiator of the action, does not send any messages you can receive.
When we go the other way around, and simply listen for what is being received in a ShaderData::Message
when it is created with that menu, we see three message ids (each sent multiple times): MSG_MULTI_RENDERNOTIFICATION = 1001071
, MSG_FILTER = 14
(which are all for the render notifactions), and 5707
which is not a MSG_
message but the id of Xbase
. So, nothing particularly useful for what you want to do.
The bottom line here is:
- I will ask the devs was their take on this is.
- I have added a task for us to update the docs, thanks for the hint! This might also extend further than just shaders, because while I could find the message being set off for objects and materials, I could not find it being set off for tags in our C++ code base. But I might have just overlooked it, will have to try with a
TagData
plugin.
Finally, could you elaborate why you need MSG_MENUPREPARE
and why NodeData::Init
won't be sufficient? You have in both cases access to the document the node is contained in, and you are relatively early in the life cycle of a node. I assume it is because you expect MSG_MENUPREPARE
to be more "unique" (for the lack of a better word), as NodeData::Init
is being called quite often in more recent versions of Cinema 4D?
Cheers,
Ferdinand