virtual public void Apply() { if (OnApplyF != null) { set_allow_selection_changes(true); // pop the history stream we pushed pop_history_stream(); // restore input selection Scene.ClearSelection(); foreach (var so in inputSelection) { Scene.Select(so, false); } if (InputSOs.Count != 1 || ForceSceneSpaceComputation) { Frame3f sceneF = estimate_frame(); PreviewSO.RepositionPivot(sceneF); } // apply PreviewSO.EnableSpatial = true; OnApplyF(this as T, PreviewSO); set_allow_selection_changes(false); PreviewSO = null; } }