Another small question that came to mind - this registration function RegisterValueChangedMessage(..) seems to have been added in R26 SDK - is there an alternative for earlier SDK versions?
Hi @m_magalhaes, this is exactly what I was looking for. It works like a charm for my first usecase.
But for the second part I encountered just a slight inconvenience. In my second usecase I actually don't want to change parameter name, I just want CreateC4DDescription(..) to be called again. From what I tested, if the name is set with the same value, the description creation is not triggered. I also tried changing another (seemingly irrelevant) attribute of the node, but that did not trigger a description change either (in particular I tried changing maxon::NODE::BASE::COMMENT).
Finally, I tried adding a new hidden port, that is not actually used, just to change its name when the description change function should be called - and this seems to work as expected. I was just wondering if there is a better solution that may achieve the same result without a dummy port?
I have two questions regarding the descriptions of nodes.
My first question is, if it is possible and how to change some description property of a node port, based on the value of another constant port. As an example, in a NodeData::GetDDescription(..) one can easily read a parameter and change the description of another parameter (e.g. change the name of one parameter based on a checkbox).
Is something similar possible to do in material nodes (or nodes in general) and how?
My second question is related to the first one in regards of dynamic changes of nodes. I tried using a custom GUI implementation based on the example.nodes plugin in the SDK. In particular I used the implementation in example.nodes/source/gui/customgui_string.cpp as a reference for using a custom GUI. I found that the getDataCallback parameter delegate can be used to actually get the GraphNode for a node in UiConversionCustomGuiString::CreateC4DDescription(..). But my question is if there is a way to trigger this function to be called again upon changes on the node, to allow dynamic updates on the node based on port value in the node?
Thanks in advance
Hi @m_magalhaes , thanks very much for the provided information.
Hi, I have several questions regarding material nodes, and mostly about their description database json files.
Any help on those questions would be greatly appreciated.
I'm just creating the portbundles from the resource editor, without a custom bundle GUI.
So I guess you only need the database? I'll try to minimize the database to include only the necessary nodes and portbundle declarations and email it to [email protected]
Could you be more specific what parts of the code are necessary - only the node space declaration, the preview image provider implementation or something else additionally?
In the standard node space, when multiple end nodes are present in the node graph, they are visually marked as invalid to hint the user that multiple end nodes should not be used.
My question is how can this be achieved for a custom node space? I couldn't find anything related in the examples or the documentation.
OK, thanks for the answer.
About my second question - what is the proper way of creating a node material instance and modifying its graph to a "preset". I want to define several such presets as commands.
There is no example for this and there seems to be no direct function for getting a mutable graph instance. From browsing the interface of NodeMaterial it seems the steps for achieving this are:
Is my assumption correct and is this the expected way of achieving this?
Upon some further investigation and testing I found this is reproducible only on R21, S22 and R23.
Is this a known issue that has been fixed for S24, and is there a workaround for earlier versions?