/// <summary> /// Overridden function /// </summary> public override void PerformRelevantOperation(string name, int iShapeIndex, int iShapeCount) { if (name == @"Goto this Position") { SetEditorCameraPosition(); return; } if (name == @"Set to camera position") { EditorManager.Actions.StartGroup("Set to camera position"); EditorManager.Actions.Add(new MoveShapeAction(this, Position, EditorManager.ActiveView.CameraPosition)); EditorManager.Actions.Add(new RotateShapeAction(this, Orientation, EditorManager.ActiveView.CameraAngles)); EditorManager.Actions.EndGroup(); return; } if (name == RO_RESETVIEW) { EditorManager.ActiveView.SetViewSettings(EditorManager.ActiveView.DefaultViewSettings, false); // retrieve current time of day: GetCurrentSettingsCallbackArgs args = new GetCurrentSettingsCallbackArgs(); EditorManager.ProfileManager.OnGetCurrentSettings(args); if (args._settings != null) { EditorManager.RendererNodeManager.SetCurrentTime(args._settings._currentTime); } EditorManager.ActiveView.UpdateView(false); return; } if (name == RO_BATCH_SCREENSHOTS) { BatchSaveScreenShots(); return; } base.PerformRelevantOperation(name, iShapeIndex, iShapeCount); }
void IProfileManager_GetCurrentSettings(object sender, GetCurrentSettingsCallbackArgs e) { e._settings = _currentSettings; }
/// <summary> /// Overridden function /// </summary> public override void PerformRelevantOperation(string name, int iShapeIndex, int iShapeCount) { if (name==@"Goto this Position") { SetEditorCameraPosition(); return; } if (name==@"Set to camera position") { EditorManager.Actions.StartGroup("Set to camera position"); EditorManager.Actions.Add(new MoveShapeAction(this,Position,EditorManager.ActiveView.CameraPosition)); EditorManager.Actions.Add(new RotateShapeAction(this, Orientation, EditorManager.ActiveView.CameraAngles)); EditorManager.Actions.EndGroup(); return; } if (name == RO_RESETVIEW) { EditorManager.ActiveView.SetViewSettings(EditorManager.ActiveView.DefaultViewSettings, false); // retrieve current time of day: GetCurrentSettingsCallbackArgs args = new GetCurrentSettingsCallbackArgs(); EditorManager.ProfileManager.OnGetCurrentSettings(args); if (args._settings != null) EditorManager.RendererNodeManager.SetCurrentTime(args._settings._currentTime); EditorManager.ActiveView.UpdateView(false); return; } if (name == RO_BATCH_SCREENSHOTS) { BatchSaveScreenShots(); return; } base.PerformRelevantOperation (name, iShapeIndex, iShapeCount); }