protected override LoadReturnCode OnLoad(ref string errorMessage) { RhinoApp.Initialized += RhinoApp_Initialized; RcCore.It.InitializeResourceManager(); // code got moved to separate DLL so use that to register from. var rccoreass = typeof(RcCore).Assembly; RenderContent.RegisterContent(rccoreass, Id); RenderContent.ContentFieldChanged += RenderContentOnContentFieldChanged; var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ""; RcCore.It.PluginPath = path; var kernelPath = Path.Combine(path, "RhinoCycles"); RcCore.It.KernelPath = kernelPath; var appPath = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location); RcCore.It.AppPath = appPath; kernelPath = RcCore.GetRelativePath(appPath, kernelPath); RcCore.It.KernelPathRelative = kernelPath; var dataPath = SettingsDirectory; var userPath = Path.Combine(dataPath, "..", "data"); userPath = RcCore.GetCanonicalizedPath(userPath); RcCore.It.DataUserPath = userPath; CSycles.path_init(RcCore.It.KernelPath, RcCore.It.DataUserPath); if (RhinoApp.RunningOnVMWare()) { CSycles.debug_set_opencl_device_type(0); } else { CSycles.debug_set_opencl_device_type(RcCore.It.EngineSettings.OpenClDeviceType); } CSycles.debug_set_opencl_kernel(RcCore.It.EngineSettings.OpenClKernelType); CSycles.debug_set_opencl_single_program(RcCore.It.EngineSettings.OpenClSingleProgram); CSycles.debug_set_cpu_kernel(RcCore.It.EngineSettings.CPUSplitKernel); RcCore.It.Initialised = false; AsyncInitialise(); m_page = new ViewportPropertiesPage(); RhinoView.SetActive += RhinoView_SetActive; return(LoadReturnCode.Success); }