Hi,
Came across this weird issue today…
I’ve been following the examples on Github (specifically, https://github.com/mcneel/rhino-developer-samples/tree/6/rhinocommon/cs/SampleCsCustomRenderSettingsSections) and copypasting the render settings section classes to my own plug-in.
It seems that either the newer versions of Rhino don’t like the example, or I am missing something very obvious. I’ve trimmed down the problem to RenderSettingsCustomSections(List<ICollapsibleSection> sections)
and when my custom section gets added. The snippet from the plug-in class looks like this:
private CustomRenderSettingsSection m_render_section;
public CustomPlugIn()
{
if (Instance == null) Instance = this;
m_render_section = new CustomRenderSettingsSection();
}
public override void RenderSettingsCustomSections(List<ICollapsibleSection> sections)
{
sections.Add(m_render_section);
//base.RenderSettingsCustomSections(sections);
}
Commenting out sections.Add(m_render_section);
makes it work.
The problem appears when I attempt to turn on the Rendering panel in Rhino, when my custom render plug-in is active. Rhino freezes and eventually crashes.
I’ve pared down the CustomRenderSettingsSection
class to the minimum, meaning getting rid of all the event handlers and usage of the CustomRenderSettingsViewModel
, to try to narrow down the problem.
CustomRenderSettingsSection
inherits from EtoCollapsibleSection
and combines CustomSection
and CustomRenderSettingsSection
from the Github example.
Does it need the ViewModel class in order to work?
Much thanks,
Tom