Material panel -> texture slot opening in the wrong panel [Bella]

@jdhill
Bella 23.4.0.0

System Info

Rhino 8 SR2 2023-11-29 (Rhino 8, 8.2.23333.09481, Git hash:master @ f86ef9263572569e355077b20611612127c1a79a)
License type: Evaluation, build 2023-11-29
License details: Cloud Zoo
Expires on: 2024-01-30

Windows 11 (10.0.22621 SR0.0) or greater (Physical RAM: 64Gb)
.NET 7.0.11

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Non-hybrid graphics configuration.
Primary display and OpenGL: NVIDIA RTX A3000 12GB Laptop GPU (NVidia) Memory: 11GB, Driver date: 10-4-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.58
> Integrated accelerated graphics device with 4 adapter port(s)
- Secondary monitor is laptop’s integrated screen or built-in port
- Windows Main Display attached to adapter port 1
Primary OpenGL: NVIDIA RTX A3000 12GB Laptop GPU (NVidia) Memory: 11GB, Driver date: 10-4-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.58
> Integrated accelerated graphics device with 4 adapter port(s)
- Secondary monitor is laptop’s integrated screen or built-in port
- Windows Main Display attached to adapter port 1

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 8x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 10-4-2023
Driver Version: 31.0.15.3758
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 11520 MB

Rhino plugins that do not ship with Rhino
C:\Users\Czaja\Desktop\Rhino_7_Win_2023.0417\HDRLightStudioTexture.rhp “HDRLightStudioTexture”
C:\Program Files\Common Files\McNeel\Rhinoceros\8.0\Plug-ins\Crayon (39629248-4fa6-47b8-83c7-745a7efea259)\1.2.0.0\Crayon\Crayon.rhp “Crayon” 1.0.0.0
C:\Users\Czaja\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\SubstanceImporter\2.0.3\Substance.Win.rhp “SubstanceImporter” 2.0.3.0
C:\ProgramData\McNeel\Rhinoceros\7.0\Plug-ins\Datasmith Rhino Exporter (d1fdc795-b334-4933-b680-088119cdc6bb)\DatasmithRhino7.rhp “Datasmith Exporter” 5.3.2.0
C:\Users\Czaja\AppData\Roaming\McNeel\Rhinoceros\8.0\Plug-ins\Bella (813de3fb-18eb-405f-bfcd-b0b4d3da91fb)\23.4.0.0\bella_rhino.rhp “Bella” 23.4.0.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp “RhinoCodePlugin” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.2.23333.9481
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

I want to access the texture slot of some material while using a full-sized Materials panel. The texture slot opens in the wrong panel. Rhino PBR material shows expected behavior - texture opens in the same panel where I clicked.

as far as I know I do not have control over this, but I can do some experiments

@jdhill Probably best person to ask about this is @maxsoder .

@jdhill No need to check, this is a bug in Rhino.

thanks guys

I think I see the problem now. Clicking the hyperlink calls RenderContent.OpenInEditor() which opens the content for editing in the main editor which in this case it the other one.

@jdhill

Can you use this instead to select the child content. I think it would work better then OpenInEditor().

/// <summary>
/// Set the selection to a certain collection of contents. This can be used, for example
/// to implement a button that selects a child or children of the currently selected content.
/// </summary>
/// <returns>Returns true if successful, else false</returns>
public bool SetSelection(Rhino.Render.RenderContentCollection collection)
{
  if (ViewModel == null)
    return false;

  RenderContentCollection selection = ViewModel.GetData(ProviderIds.ContentSelection, true, false) as RenderContentCollection;

  selection.Clear();
  selection.Add(collection);
  ViewModel.Commit(ProviderIds.ContentSelection);

  return true;
}

I’ll see, but this code is far from anywhere with a view model

What is the base class of the section with the hyperlink? Is it an EtoContentUISection?

this lives in a generic attribute control that is used for every attribute in my plugin, whether in render content, render settings, object properties, etc

so there are view models in some cases, in parents of parents, so I’ll have to see how to flow that through, or call back up