Hi - some comments and questions on the recent build of Rhino 6…
Changing method names (like ShowMessageBox changes to ShowMessage) makes it a lot amount of work to have one codebase for both Rhino5 and Rhino6, filled with #if RHINO6 statements, and doesn’t add any functionality.
warning CS0618: ‘Rhino.Render.RenderContent.AddPersistentRenderContent(Rhino.RhinoDoc, Rhino.Render.RenderContent)’ is obsolete: ‘Use RhinoDoc.RenderMaterials.Attach’ - there is no RenderMaterial.Attach method.
‘Rhino.Render.UI.IUserInterfaceSection’ is obsolete - what is it replaced with pls?
Hi Paul,
Feel free to continue to call the ShowMessageBox function. We thought at one point that we were going to have to remove any reference to Winforms in RhinoCommon to get things to work on Mac. The ShowMessageBox function was returning a WinForms enum which is why it was marked as Obsolete. It will continue to work in V6 and more likely I will just remove the obsolete flag but keep another flag around to hide this function from autocomplete in Visual Studio in the future.
Where did Rhino.RhinoDoc.ActiveDoc.RenderMaterials.Render go pls?
What is the deprecated Rhino.Render.RenderEnvironment.CurrentEnvironment returning? Is it returning ForAnyUsage? Is there source for the Rhino6 RhinoCommon on-line so I can look at this stuff myself?
I’m not finding Rhino.RhinoDoc.ActiveDoc.RenderMaterials.Render in the documentation, nor can I find it in the RhinoCommon SDK when I start a fresh C# project in VS2010. What was this supposed to do?
It returns background environment (or default if there isn’t any).
Thanks @nathanletwory. Any ideas on questions 2) and 3) above pls?
I’m not finding Rhino.RhinoDoc.ActiveDoc.RenderMaterials.Render in the documentation, nor can I find it in the RhinoCommon SDK when I start a fresh C# project in VS2010. What was this supposed to do?
It has vanished for me too - so it must have been in a previous version of Rhino WIP. Pls disregard this issue.
I have got the Octane plugin running, but there are a few show stoppers.
When I close Rhino, Rhino is re-opening the Octane panel (ie. recreating the form) - which crashes Rhino. To replicate this, download the Rhino WIP demo version of the plugin from https://my.pcloud.com/publink/show?code=XZxdmNZkYIhB4kcPrVLS8XNfaDIbuM3Gd70 . Start Rhino, install the plugin, click the Gear icon on the tabs panel and add the OctaneRender panel. Then close Rhino, and it will crash (because Rhino is re-creating the OctaneRender panel for some reason).
Materials are a bit of a mess. Start Rhino, click the Gear icon to add the OctaneRender panel, then click the Materials panel, + Octane Material, click on the Diffuse tree item and change the node type to Turbulence. The scrollbars should appear on the Material panel now (make the Rhino window smaller if it does) - move the scrollbar and all the widgets render artifacts on the screen.
I see the crash happening, for some reason your handlers are getting called in your HostMaster. I am in the process of rebuilding my dev machine with new SSDs (suspected drive failure causing all kinds of weird errors). Until I get that done and can have a better look could you try unregistering any events you have registered to Rhino during plug-in shutdown?
I see it is enough to just start scrolling in the material once added. This UI is created with Winforms, right? Reported as RH-39124.
Thanks Nathan - I will try unregistering the events in Dispose (although there are a lot of them!). This was not needed in Rhino5. FYI, I can see that the form constructor is being called when Rhino is shutdown.
Add the OctaneRender panel to the tabs
OctaneRenderForRhinoPlugIn.OnLoad
SetupForm constructor
Close Rhino
SetupForm.dispose
SetupForm constructor
crash
This UI is created with Winforms, right?
The panel causing issues is created as follows. I have had issues in Rhino5 too (and reported it to you a couple of years ago), but for some reason it is much worse in Rhino6.
public partial class OctaneMaterialTreeControl : UserControl, IUserInterfaceSection
{
public OctaneMaterialTreeControl()
{
SetStyle(ControlStyles.ResizeRedraw, true);
InitializeComponent();
this.groupBoxMaterials.HandleCreated += new EventHandler(groupBoxMaterials_HandleCreated);
this.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.ClientSizeChanged += new EventHandler(OctaneMaterialTreeControl_ClientSizeChanged);
this.HandleCreated += new EventHandler(OctaneMaterialTreeControl_HandleCreated);
etc
Hi - this was fixed correctly in a previous release, but unfortunately this problem is worse than ever in the current RhinoWIP release (6.0.17262.13121, 19-Sep-17).
can you maybe provide a new build of your plug-in for us to test? If you want to keep it private please send it as a direct message to me on Discourse.
Thanks @andy. I have re-engineered my plugin as you describe - but it was substantially more complex than I thought it would be - and I still have a lot of issues.
For instance - Rhino.PlugIns.RenderPlugIn.CreatePreview() is not being called when I click Thumbnails->Update All Previews.