JBenghiat 333 Posted September 14, 2018 I have a button that changes to a 3D view based on the plug-in's orientation. I can't get the render mode to change. I've tried: gSDK->SetRenderMode(gSDK->GetActiveLayer(), renderOpenGL, true, true); gSDK->NewCurrentViewMatrix(viewMatrix, true); WorldRect drawRect; ViewRect windowRect; gSDK->GetScreenSize(windowRect); gSDK->ViewRect2WorldRect(windowRect, drawRect); gSDK->RedrawRect(drawRect); in various orders, but the render mode always stays as is. The RW camera successfully changes render modes, so this must be possible... Quote Share this post Link to post
JBenghiat 333 Posted September 25, 2018 So far my only solution involves DoMenuName()... Quote Share this post Link to post
JBenghiat 333 Posted October 10, 2018 Ok, figured it out. This works: gSDK->SwitchFromPlanTo3DView(); gSDK->SetViewMatrixByVector(lookFrom, lookTo, WorldPt3(0, 0, 1), viewMatrix); gSDK->SetRenderMode(gSDK->GetActiveLayer(), renderOpenGL, true, true); gSDK->NewCurrentViewMatrix(viewMatrix, false); gSDK->RefreshRenderingForSelectedObjects(); I didn't take the time to test whether SwitchFromPlanTo3DView() or RefreshRenderingForSelectedObjects() or both are what makes it work, but it's been reliable so far. Quote Share this post Link to post