Perspective and Shaded

How do you enable Perspective view and shaded mode from RhinoCommon?

Hi @reuben.alfred,

Here you go:

protected override Result RunCommand(RhinoDoc doc, RunMode mode)
  var view = doc.Views.ActiveView;
  if (null == view)
    return Result.Failure;

  view.ActiveViewport.ChangeToPerspectiveProjection(true, 50.0);

  var shadedId = DisplayModeDescription.ShadedId;
  var displayModeDescription = DisplayModeDescription.GetDisplayMode(shadedId);
  if (null != displayModeDescription)
    view.ActiveViewport.DisplayMode = displayModeDescription;


  return Result.Success;

– Dale

Thanks Dale!