SOLVED [fwd] Add command to right click parameter menu

Dear community,

due to the smaller hiccups occurring alongside the migration from our old Plugin Café design to this new one, a support request did reach us by mail. We are sharing this here, so that the answer is publicly available.

You can find the original question below.

Cheers,
Ferdinand


Hey guys,

Is it possible, via C++, to add a command to the right click menu that pops up for a parameter in C4D? Such as this scale vector as shown below.

I would like to call a command and somehow get the parameter that was right clicked on as well. I don't think this is possible at all, but can't hurt to ask just in case. I would need this for R20 to S24.

123.png

FYI: I tried posting this to the plugincafe, but there are no categories to choose from so it doesn't allow me to post since I didn't set a category.

Cheers,
[redacted]

Dear user,

thank you for reaching out to us.

Is it possible, via C++, to add a command to the right click menu that pops up for a parameter in C4D?

Unfortunately, that is not possible. The context menu of a DescriptionCustomGui is sealed off from user access. The specific context menu is not meant to be modified.

I would like to call a command and somehow get the parameter that was right clicked on as well. I don't think this is possible at all, but can't hurt to ask just in case.

You are right, this is also not possible, at least in the context you are most likely talking about. You can get hold of the selected element(s) in a DescriptionCustomGui via GetDescIDSelection() (Link), but this requires one to get hold of that DescriptionCustomGui obviously. Since you are very likely talking about the Attribute Manger, this is effectively not possible, since you cannot get hold of it from the SDK side (in the way you want to). For a custom GeDialog with a DescriptionCustomGui this would be possible. While we can technically get hold of an Attribute Manager when implementing nodes, I do not see a way to get hold of its DescriptionCustomGui nonetheless.

Cheers,
Ferdinand