i’m currently trying to create Bitmaps from Rhino Viewports. It’s important that my Images are created in Rendered Mode, also when the user is using Wireframe Mode for example.
So im using this [SDK Command] (http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Display_RhinoView_CaptureToBitmap_5.htm) to achive this. It says Supported in: 5.4 WIP (Mac) but when im using this with any DisplayModeDescription it throws following exception: System.NullReferenceException: Object reference not set to an instance of an object at MechanismRemix.Commands.imgRendering.RunCommand (Rhino.RhinoDoc doc, RunMode mode) [0x000dd] in :0
Code to GetDescription:
DisplayModeDescription getRenderMode(){
DisplayModeDescription[] modes = DisplayModeDescription.GetDisplayModes();
foreach (var dmd in modes)
{
if (dmd.EnglishName.Equals("Rendered")) return dmd;
}
return null;
}
Thank you for the very quick answer!
Seems to not be related, i can do some operations on the Mode that is returned so it should not be null.
But its good to be aware ot that anyway