예제 #1
0
  public void RecordPath() {
    // See README.md section # Video support and # Camera path support.
    m_Widget.ResetToPathStart();
    m_Widget.TintForRecording(true);
    UpdateCameraTransform(m_Widget.transform);
    WidgetManager.m_Instance.FollowingPath = true;
    // When we begin recording a camera path, switch to the CameraPathTool and set the
    // mode to recording.
    SketchSurfacePanel.m_Instance.EnableSpecificTool(BaseTool.ToolType.CameraPathTool);
    App.Switchboard.TriggerCameraPathModeChanged(CameraPathTool.Mode.Recording);

    VideoRecorderUtils.StartVideoCapture(
        MultiCamTool.GetSaveName(MultiCamStyle.Video),
        m_Manager.GetComponent<VideoRecorder>(),
        m_VideoUsdSerializer);
  }
  public void StopRecordingPath(bool saveCapture) {
    string message = saveCapture ? "Path Recorded!" : "Recording Canceled";
    OutputWindowScript.m_Instance.CreateInfoCardAtController(
        InputManager.ControllerName.Brush, message);
    if (saveCapture) {
      string filePath = null;
      if (VideoRecorderUtils.ActiveVideoRecording != null) {
        filePath = VideoRecorderUtils.ActiveVideoRecording.FilePath;
      }
      if (filePath != null) {
        ControllerConsoleScript.m_Instance.AddNewLine(filePath);
      }
    }
    VideoRecorderUtils.StopVideoCapture(saveCapture);
    WidgetManager.m_Instance.FollowingPath = false;
    m_Widget.ResetToPathStart();
    m_Widget.TintForRecording(false);

    // When we stop recording a camera path, make sure our CameraPathTool isn't in the
    // recording state.
    SketchSurfacePanel.m_Instance.EnableSpecificTool(BaseTool.ToolType.CameraPathTool);
    App.Switchboard.TriggerCameraPathModeChanged(CameraPathTool.Mode.AddPositionKnot);
  }