That's what I was looking for, thanks a lot!
I am trying to save a node material that I just created using the resource editor as a .json file but I can not find any option to do that.
Is there any workaround for this?
I came up with this solution which is working fine. Thanks for your help.
getDropDownName(Description* const description,
const DescID* singleid = description->GetSingleDescID();
const DescID cid = DescLevel(group_id, DTYPE_LONG, 0);
std::string selected_name = "";
if (!singleid || cid.IsPartOf(*singleid, nullptr))
BaseContainer* selectionParameter =
description->GetParameterI(DescLevel(group_id, DTYPE_LONG, 0), arr);
if (selectionParameter != nullptr)
BaseContainer* items =
if (items != nullptr)
Is there any way to get the string value of the selected option from a cycle parameter? I tried to use shader's description (as I am testing on a shader) but it does not give the right result.
I see, thank you for the answer.
I have used a texbox customGui inside my iCustomGui, but for some reasons, it seems that I can not apply a shader to it.
The attribute is shown on the UI but does not seem to be functional.
On my iCustomGui::CreateLayout(), I have added it together with some other attributes, but this is the only one that is not functional.
TexBoxGui* list = (TexBoxGui*)AddCustomGui(COLOR_ID + i, CUSTOMGUI_TEXBOX, String(), BFH_SCALEFIT, 0, 0, settings);
Is there something I am missing?
Trying to "force" the UI update using EventAdd() after setting the node dirty still does not trigger GetDDescription function. I thought this was what I was missing but seems there is something else.
I am not 100% sure if it will be the final workflow, but for now, that's our intention. We are trying to keep a uniform UI on all DCCs (as in the image below) and this way has proven to be efficient.
Of course, this will not be the only way to launch a render, but if we see it to be efficient in Cinema4D too then yes this will also be a way we will keep.
Unfortunately, our C4D plugin is too far away from other plugins that we support on other DCCs, and there's still a lot to do.
As for the buttons' workflow, it would be:
Clicking Render will set the button to Abort Render and make the other two buttons insensitive until rendering finishes (that is why I want to update the UI after rendering is finished), or abort render is clicked which this updates the UI fine.
The same goes for the other two buttons (Start IPR -> Abort IPR and make the other two buttons insensitive until you abort it).
BaseDocument* doc = GetActiveDocument();
BaseDocument* renderdoc = (BaseDocument*) doc->GetClone(COPYFLAGS::DOCUMENT, nullptr);
RenderData* rd = renderdoc->GetActiveRenderData();
If this is what you mean for getting the rendering document, I am using this way on my original code. I am not sure if the issue is related to this.
Tried that by still the same :/.
I am using R21.027.
From python console, it worked fine. After setting the node dirty, getDDescription function got executed. But I wonder what is different as the same event is being executed when the rendering finishes and the node is set Dirty except that getDDescription does not get executed after.