I have a sample scene which freezes Rhino when I try to run our plugin as an interactive viewport renderer.
It seems our ChangeQueue implementation causes the problem, it hangs at the queue.CreateWorld() call.
I see no reason for this, so I tried with other ChangeQueue implementations. There is the sample project “SampleCsRdk”. I have made one small modification on this project in the “rdktest_csPlugIn.cs” file:
from:
public override bool StartRenderer(int w, int h, RhinoDoc doc, ViewInfo view, ViewportInfo viewportInfo, bool forCapture, RenderWindow renderWindow)
{
throw new NotImplementedException();
}
to:
public override bool StartRenderer(int w, int h, RhinoDoc doc, ViewInfo view, ViewportInfo viewportInfo, bool forCapture, RenderWindow renderWindow)
{
var queue=new RdkTestChangeQueue(PlugIn.IdFromName(“RdkTest”), doc.RuntimeSerialNumber, view);
queue.CreateWorld();
}
When I call the the interactive viewport renderer “RdkTest”, it freezes also at queue.CreateWorld();, so I guess something is not OK there.
There is one material inside the scene. This material has texture map on the color and bump channels. If I remove these texture maps, it doesn’t freeze anymore.
And there is a very interesting side-effect(???) bug too (you need the SampleCsRdk plugin to try it):
These are the steps to reproduce it (at least on my computer):
0.) Start Rhino
1.) Open the file “frozen.3dm”
You see this:
2.) write at command line: rdk_test.cs (so start the plugin)
3.) go to the materials panel
4.) select the material and turn off the color or bump channel (click on the check box)
Now you see this(???)
Here I attach the sample filefrozen.3dm (293.2 KB)
frozen.3dm (293.2 KB)