Hello @ECHekman,
It is very unlikely that this will ever change unless we do a fundamental rewrite of our UI core (which itself is not that unlikely but there are no current concrete plans or an ETA, Cinema 4D could keep using its current UI core for another decade).
What Redshift, or more concretely things like the foreground object, are doing, is not loading or modifying palettes. They are modifying the state of the command via CMD_HIDDEN. For things where you usually do not have control over the command implementation, you can register a CommandGetStateDelegate for a specific command ID. This delegate will be called whenever the state of the command is queried, and you can then modify the state as you see fit.
Cheers,
Ferdinand
Code
// Demonstrates how to register a CommandGetStateDelegate for a specific command ID, allowing us to
// override the CommandData::GetState behavior of the command, i.e., how its enabled/checked/
// hidden (and more) behavior is.
//
// Doing this is usually only necessary if the command implementation is not under our control, as
// for example, for scene elements (NodeData, ObjectData, etc.) where we usually do not implement the
// command ourselves but let Cinema 4D handle it.
//
// NEVER IMPLEMENT ANY STATE DELEGATES FOR COMMANDS THAT YOU DO NOT OWN.
// This is the state handler for the foreground object command. It will hide the command if the active
// renderer is Redshift.
namespace maxon
{
MAXON_DECLARATION_REGISTER(CommandGetStateDelegates, NumToString<Oforeground>::value)
{
CommandGetStateDelegate delegate = [](cinema::BaseDocument* doc) -> Int32
{
Int32 state = cinema::CMD_ENABLED;
if (doc)
{
cinema::RenderData* rd = doc->GetActiveRenderData();
if (rd)
{
const Bool isRedshiftActiveRenderer = rd->GetDataInstance()->GetInt32(RDATA_RENDERENGINE) == VPrsrenderer;
if (isRedshiftActiveRenderer)
state |= cinema::CMD_HIDDEN;
}
}
return state;
};
return delegate;
}
} // namespace maxon