{"action":"created","issue":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4768","labels_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4768/labels{/name}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4768/comments","events_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4768/events","html_url":"https://github.com/DynamoDS/Dynamo/pull/4768","id":90189823,"number":4768,"title":"MAGN-6761 Reload camera position for background preview from file.","user":{"login":"ikeough","id":1139788,"avatar_url":"https://avatars.githubusercontent.com/u/1139788?v=3","gravatar_id":"","url":"https://api.github.com/users/ikeough","html_url":"https://github.com/ikeough","followers_url":"https://api.github.com/users/ikeough/followers","following_url":"https://api.github.com/users/ikeough/following{/other_user}","gists_url":"https://api.github.com/users/ikeough/gists{/gist_id}","starred_url":"https://api.github.com/users/ikeough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikeough/subscriptions","organizations_url":"https://api.github.com/users/ikeough/orgs","repos_url":"https://api.github.com/users/ikeough/repos","events_url":"https://api.github.com/users/ikeough/events{/privacy}","received_events_url":"https://api.github.com/users/ikeough/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DynamoDS/Dynamo/labels/PTAL","name":"PTAL","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"lukechurch","id":2978182,"avatar_url":"https://avatars.githubusercontent.com/u/2978182?v=3","gravatar_id":"","url":"https://api.github.com/users/lukechurch","html_url":"https://github.com/lukechurch","followers_url":"https://api.github.com/users/lukechurch/followers","following_url":"https://api.github.com/users/lukechurch/following{/other_user}","gists_url":"https://api.github.com/users/lukechurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lukechurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukechurch/subscriptions","organizations_url":"https://api.github.com/users/lukechurch/orgs","repos_url":"https://api.github.com/users/lukechurch/repos","events_url":"https://api.github.com/users/lukechurch/events{/privacy}","received_events_url":"https://api.github.com/users/lukechurch/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-06-22T19:33:24Z","updated_at":"2015-07-05T17:40:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4768","html_url":"https://github.com/DynamoDS/Dynamo/pull/4768","diff_url":"https://github.com/DynamoDS/Dynamo/pull/4768.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/4768.patch"},"body":"### Purpose\r\n\r\nThis PR relates to [MAGN-6761](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-6761). This feature adds the ability to save the orientation of the background camera to the .dyn file. It does this by exposing two workspace events that enable the view to hook the file saving/loading process. These new events are `WorkspaceModel.Saving` and `DynamoModel.WorkspaceLoading`. An architectural review is recommended as these events allow access to the `XmlDocument` representing the .dyn during its creation. Misuse of these events could cause corruption of the saved file.\r\n\r\n### Impact assessment\r\n\r\n- [ ] Changes the way 3rd party nodes work (Add ikeough to the reviewer list)\r\n- [ ] Includes migrations (Add ikeough to the reviewer list)\r\n- [x] Changes a public interface (Add lukechurch to the reviewer list)\r\n- [ ] Affects which components of the system depends on which other components (Add pboyer to the reviewer list)\r\n- [ ] Introduces new components (Add lukechurch to the reviewer list)\r\n- [ ] Has a performance impact (Add keyu to the reviewer list)\r\n- [ ] Changes the installer (Add sharadkjaiswal to the reviewer list)\r\n\r\n#### Testing strategy\r\n\r\n- Automated tests are available in `CameraTests.cs`.\r\n- Manual testing should cover the following scenarios.\r\n  - Dynamo opened. Camera is oriented to default position.\r\n  - No camera data in .dyn, file loads successfully and camera is oriented to default position.\r\n  - Good camera data in .dyn file. File loads successfully and camera orientation is set correctly.\r\n  - Corrupt camera data in .dyn file. File loads successfully. Camera orientation is set to default. Warning message is displayed in the console.\r\n  - File saved and reloaded. Camera is oriented as before saving.\r\n  - Workspace cleared. Camera is set to default orientation.\r\n\r\n### Review staging\r\n\r\n- [ ] Architectural Design Review\r\n- [ ] UI Review\r\n\r\n### Reviewers\r\n\r\n@lukechurch \r\n\r\n(FILL ME IN, optional) Any additional notes to reviewers or testers."},"comment":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/comments/118640149","html_url":"https://github.com/DynamoDS/Dynamo/pull/4768#issuecomment-118640149","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4768","id":118640149,"user":{"login":"lukechurch","id":2978182,"avatar_url":"https://avatars.githubusercontent.com/u/2978182?v=3","gravatar_id":"","url":"https://api.github.com/users/lukechurch","html_url":"https://github.com/lukechurch","followers_url":"https://api.github.com/users/lukechurch/followers","following_url":"https://api.github.com/users/lukechurch/following{/other_user}","gists_url":"https://api.github.com/users/lukechurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lukechurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukechurch/subscriptions","organizations_url":"https://api.github.com/users/lukechurch/orgs","repos_url":"https://api.github.com/users/lukechurch/repos","events_url":"https://api.github.com/users/lukechurch/events{/privacy}","received_events_url":"https://api.github.com/users/lukechurch/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T17:40:13Z","updated_at":"2015-07-05T17:40:13Z","body":"Thanks @ikeough  LGTM"}}