Notifications
Clear all

[Closed] Rendering tab draw glitch with 3ds Max 2017

Hello,

In our renderer plugin, we recently decided to hide irrelevant tabs from the Render Setup dialog.

The problem is that in 3ds Max 2017 (and this version only, the problem does not occur in 3ds Max 2016 or 2015), the first time our tab is displayed, its content is briefly displayed then immediately erased, and I get this:

If I switch to the Common tab then back to the Renderer tab, it displays correctly:

Here is a summary of our changes to hide unwanted tabs:

  1. Our renderer plugin class now implements ITabDialogObject.

  2. We implemented GetInterface(Interface_ID id) as such:


BaseInterface* AppleseedRenderer::GetInterface(Interface_ID id)
{
    if (id == TAB_DIALOG_OBJECT_INTERFACE_ID)
        return static_cast<ITabDialogObject*>(this);
    else return Renderer::GetInterface(id);
}

  1. We overrode ITabDialogObject::AddTabToDialog() to add back our own tab:

void AppleseedRenderer::AddTabToDialog(
    ITabbedDialog*          dialog,
    ITabDialogPluginTab*    tab) 
{
    const int RenderRollupWidth = 222;  // the width of the render rollout in dialog units
    dialog->AddRollout(
        L"Renderer",
        nullptr,
        AppleseedRendererTabClassId,
        tab,
        -1,
        RenderRollupWidth,
        0,
        0,
        ITabbedDialog::kSystemPage);
}

  1. We overrode ITabDialogObject::AcceptTab() to remove unwanted tabs:

int AppleseedRenderer::AcceptTab(
    ITabDialogPluginTab*    tab)
{
    const Class_ID RayTraceTabClassId(0x4fa95e9b, 0x9a26e66);
    if (tab->GetSuperClassID() == RADIOSITY_CLASS_ID)
        return 0;
    if (tab->GetClassID() == RayTraceTabClassId)
        return 0;
    return TAB_DIALOG_ADD_TAB;
}

Is there anything wrong with our code? Did anyone else observe this problem?

Thanks,

Franz