{"action":"created","comment":{"url":"https://api.github.com/repos/GafferHQ/gaffer/pulls/comments/240413400","pull_request_review_id":183438375,"id":240413400,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDQxMzQwMA==","diff_hunk":"@@ -222,6 +227,86 @@ void bookmarks( const Node *node, std::vector<NodePtr> &bookmarks )\n \t}\n }\n \n+IECore::InternedString numericBookmarkMetadataName( int bookmark )\n+{\n+\treturn g_numericBookmarkBaseName.string() + std::to_string( bookmark );\n+}\n+\n+void setNumericBookmark( ScriptNode *scriptNode, int bookmark, Node *node )\n+{\n+\tif( bookmark < 1 || bookmark > 9 )\n+\t{\n+\t\tthrow IECore::Exception( \"Values for numeric bookmarks need to be in {1, ..., 9}.\" );\n+\t}\n+\n+\t// No other node can have the same bookmark value assigned\n+\tIECore::InternedString metadataName{ numericBookmarkMetadataName( bookmark ) };\n+\tfor( Node *nodeWithMetadata : Metadata::nodesWithMetadata( scriptNode, metadataName, /* instanceOnly = */ true ) )\n+\t{\n+\t\tMetadata::deregisterValue( nodeWithMetadata, metadataName );\n+\t}\n+\n+\tif( !node )\n+\t{\n+\t\treturn;\n+\t}\n+\n+\t// Replace a potentially existing value with the one that is to be assigned.\n+\tint currentValue = getNumericBookmark( node );\n+\tif( currentValue )\n+\t{\n+\t\tMetadata::deregisterValue( node, numericBookmarkMetadataName( currentValue) );\n+\t}\n+\n+\tMetadata::registerValue( node, metadataName, new BoolData( true ), /* persistent = */ false );\n+}\n+\n+Node *getNumericBookmark( ScriptNode *scriptNode, int bookmark )","path":"src/Gaffer/MetadataAlgo.cpp","position":60,"original_position":60,"commit_id":"2ec0c0af867b4680a027ac2fbb8fb24c1cff3b15","original_commit_id":"2ec0c0af867b4680a027ac2fbb8fb24c1cff3b15","user":{"login":"mattigruener","id":19398650,"node_id":"MDQ6VXNlcjE5Mzk4NjUw","avatar_url":"https://avatars2.githubusercontent.com/u/19398650?v=4","gravatar_id":"","url":"https://api.github.com/users/mattigruener","html_url":"https://github.com/mattigruener","followers_url":"https://api.github.com/users/mattigruener/followers","following_url":"https://api.github.com/users/mattigruener/following{/other_user}","gists_url":"https://api.github.com/users/mattigruener/gists{/gist_id}","starred_url":"https://api.github.com/users/mattigruener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattigruener/subscriptions","organizations_url":"https://api.github.com/users/mattigruener/orgs","repos_url":"https://api.github.com/users/mattigruener/repos","events_url":"https://api.github.com/users/mattigruener/events{/privacy}","received_events_url":"https://api.github.com/users/mattigruener/received_events","type":"User","site_admin":false},"body":"It is worth throwing here if the given bookmark is not in {1...9}?","created_at":"2018-12-10T22:55:10Z","updated_at":"2018-12-10T22:58:34Z","html_url":"https://github.com/GafferHQ/gaffer/pull/2729#discussion_r240413400","pull_request_url":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/GafferHQ/gaffer/pulls/comments/240413400"},"html":{"href":"https://github.com/GafferHQ/gaffer/pull/2729#discussion_r240413400"},"pull_request":{"href":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729"}}},"pull_request":{"url":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729","id":207483348,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3NDgzMzQ4","html_url":"https://github.com/GafferHQ/gaffer/pull/2729","diff_url":"https://github.com/GafferHQ/gaffer/pull/2729.diff","patch_url":"https://github.com/GafferHQ/gaffer/pull/2729.patch","issue_url":"https://api.github.com/repos/GafferHQ/gaffer/issues/2729","number":2729,"state":"open","locked":false,"title":"Numeric Hotkeys for Viewer ","user":{"login":"mattigruener","id":19398650,"node_id":"MDQ6VXNlcjE5Mzk4NjUw","avatar_url":"https://avatars2.githubusercontent.com/u/19398650?v=4","gravatar_id":"","url":"https://api.github.com/users/mattigruener","html_url":"https://github.com/mattigruener","followers_url":"https://api.github.com/users/mattigruener/followers","following_url":"https://api.github.com/users/mattigruener/following{/other_user}","gists_url":"https://api.github.com/users/mattigruener/gists{/gist_id}","starred_url":"https://api.github.com/users/mattigruener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattigruener/subscriptions","organizations_url":"https://api.github.com/users/mattigruener/orgs","repos_url":"https://api.github.com/users/mattigruener/repos","events_url":"https://api.github.com/users/mattigruener/events{/privacy}","received_events_url":"https://api.github.com/users/mattigruener/received_events","type":"User","site_admin":false},"body":"Hey John,\r\n\r\nI guess I can demo this tomorrow at my desk - I'm mostly putting the code up because Daniel said he might want to use it tomorrow. \r\n\r\nCheerio and welcome back to Vancouver!\r\n\r\nMatti.\r\n\r\n","created_at":"2018-08-10T01:14:29Z","updated_at":"2018-12-10T22:58:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"760ebc5518820c53fa22e28b30a1bdf06f354daf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1094849652,"node_id":"MDU6TGFiZWwxMDk0ODQ5NjUy","url":"https://api.github.com/repos/GafferHQ/gaffer/labels/docs-updateRequired","name":"docs-updateRequired","color":"ffaa00","default":false},{"id":164636365,"node_id":"MDU6TGFiZWwxNjQ2MzYzNjU=","url":"https://api.github.com/repos/GafferHQ/gaffer/labels/pr-revisionRequired","name":"pr-revisionRequired","color":"FFAAAA","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729/commits","review_comments_url":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729/comments","review_comment_url":"https://api.github.com/repos/GafferHQ/gaffer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GafferHQ/gaffer/issues/2729/comments","statuses_url":"https://api.github.com/repos/GafferHQ/gaffer/statuses/2ec0c0af867b4680a027ac2fbb8fb24c1cff3b15","head":{"label":"mattigruener:imageViewerNumbers","ref":"imageViewerNumbers","sha":"2ec0c0af867b4680a027ac2fbb8fb24c1cff3b15","user":{"login":"mattigruener","id":19398650,"node_id":"MDQ6VXNlcjE5Mzk4NjUw","avatar_url":"https://avatars2.githubusercontent.com/u/19398650?v=4","gravatar_id":"","url":"https://api.github.com/users/mattigruener","html_url":"https://github.com/mattigruener","followers_url":"https://api.github.com/users/mattigruener/followers","following_url":"https://api.github.com/users/mattigruener/following{/other_user}","gists_url":"https://api.github.com/users/mattigruener/gists{/gist_id}","starred_url":"https://api.github.com/users/mattigruener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattigruener/subscriptions","organizations_url":"https://api.github.com/users/mattigruener/orgs","repos_url":"https://api.github.com/users/mattigruener/repos","events_url":"https://api.github.com/users/mattigruener/events{/privacy}","received_events_url":"https://api.github.com/users/mattigruener/received_events","type":"User","site_admin":false},"repo":{"id":59069132,"node_id":"MDEwOlJlcG9zaXRvcnk1OTA2OTEzMg==","name":"gaffer","full_name":"mattigruener/gaffer","private":false,"owner":{"login":"mattigruener","id":19398650,"node_id":"MDQ6VXNlcjE5Mzk4NjUw","avatar_url":"https://avatars2.githubusercontent.com/u/19398650?v=4","gravatar_id":"","url":"https://api.github.com/users/mattigruener","html_url":"https://github.com/mattigruener","followers_url":"https://api.github.com/users/mattigruener/followers","following_url":"https://api.github.com/users/mattigruener/following{/other_user}","gists_url":"https://api.github.com/users/mattigruener/gists{/gist_id}","starred_url":"https://api.github.com/users/mattigruener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattigruener/subscriptions","organizations_url":"https://api.github.com/users/mattigruener/orgs","repos_url":"https://api.github.com/users/mattigruener/repos","events_url":"https://api.github.com/users/mattigruener/events{/privacy}","received_events_url":"https://api.github.com/users/mattigruener/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mattigruener/gaffer","description":"Gaffer is an open source application framework designed specifically for creating tools for use in visual effects production.","fork":true,"url":"https://api.github.com/repos/mattigruener/gaffer","forks_url":"https://api.github.com/repos/mattigruener/gaffer/forks","keys_url":"https://api.github.com/repos/mattigruener/gaffer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattigruener/gaffer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattigruener/gaffer/teams","hooks_url":"https://api.github.com/repos/mattigruener/gaffer/hooks","issue_events_url":"https://api.github.com/repos/mattigruener/gaffer/issues/events{/number}","events_url":"https://api.github.com/repos/mattigruener/gaffer/events","assignees_url":"https://api.github.com/repos/mattigruener/gaffer/assignees{/user}","branches_url":"https://api.github.com/repos/mattigruener/gaffer/branches{/branch}","tags_url":"https://api.github.com/repos/mattigruener/gaffer/tags","blobs_url":"https://api.github.com/repos/mattigruener/gaffer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattigruener/gaffer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattigruener/gaffer/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattigruener/gaffer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattigruener/gaffer/statuses/{sha}","languages_url":"https://api.github.com/repos/mattigruener/gaffer/languages","stargazers_url":"https://api.github.com/repos/mattigruener/gaffer/stargazers","contributors_url":"https://api.github.com/repos/mattigruener/gaffer/contributors","subscribers_url":"https://api.github.com/repos/mattigruener/gaffer/subscribers","subscription_url":"https://api.github.com/repos/mattigruener/gaffer/subscription","commits_url":"https://api.github.com/repos/mattigruener/gaffer/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattigruener/gaffer/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattigruener/gaffer/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattigruener/gaffer/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattigruener/gaffer/contents/{+path}","compare_url":"https://api.github.com/repos/mattigruener/gaffer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattigruener/gaffer/merges","archive_url":"https://api.github.com/repos/mattigruener/gaffer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattigruener/gaffer/downloads","issues_url":"https://api.github.com/repos/mattigruener/gaffer/issues{/number}","pulls_url":"https://api.github.com/repos/mattigruener/gaffer/pulls{/number}","milestones_url":"https://api.github.com/repos/mattigruener/gaffer/milestones{/number}","notifications_url":"https://api.github.com/repos/mattigruener/gaffer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattigruener/gaffer/labels{/name}","releases_url":"https://api.github.com/repos/mattigruener/gaffer/releases{/id}","deployments_url":"https://api.github.com/repos/mattigruener/gaffer/deployments","created_at":"2016-05-18T00:37:47Z","updated_at":"2017-12-26T16:52:15Z","pushed_at":"2018-12-10T22:26:40Z","git_url":"git://github.com/mattigruener/gaffer.git","ssh_url":"git@github.com:mattigruener/gaffer.git","clone_url":"https://github.com/mattigruener/gaffer.git","svn_url":"https://github.com/mattigruener/gaffer","homepage":"http://imageengine.github.io/gaffer/","size":120408,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GafferHQ:master","ref":"master","sha":"4c87a2399f163354592267b58ad85f747632a909","user":{"login":"GafferHQ","id":20556043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTU2MDQz","avatar_url":"https://avatars1.githubusercontent.com/u/20556043?v=4","gravatar_id":"","url":"https://api.github.com/users/GafferHQ","html_url":"https://github.com/GafferHQ","followers_url":"https://api.github.com/users/GafferHQ/followers","following_url":"https://api.github.com/users/GafferHQ/following{/other_user}","gists_url":"https://api.github.com/users/GafferHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/GafferHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GafferHQ/subscriptions","organizations_url":"https://api.github.com/users/GafferHQ/orgs","repos_url":"https://api.github.com/users/GafferHQ/repos","events_url":"https://api.github.com/users/GafferHQ/events{/privacy}","received_events_url":"https://api.github.com/users/GafferHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":9043124,"node_id":"MDEwOlJlcG9zaXRvcnk5MDQzMTI0","name":"gaffer","full_name":"GafferHQ/gaffer","private":false,"owner":{"login":"GafferHQ","id":20556043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTU2MDQz","avatar_url":"https://avatars1.githubusercontent.com/u/20556043?v=4","gravatar_id":"","url":"https://api.github.com/users/GafferHQ","html_url":"https://github.com/GafferHQ","followers_url":"https://api.github.com/users/GafferHQ/followers","following_url":"https://api.github.com/users/GafferHQ/following{/other_user}","gists_url":"https://api.github.com/users/GafferHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/GafferHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GafferHQ/subscriptions","organizations_url":"https://api.github.com/users/GafferHQ/orgs","repos_url":"https://api.github.com/users/GafferHQ/repos","events_url":"https://api.github.com/users/GafferHQ/events{/privacy}","received_events_url":"https://api.github.com/users/GafferHQ/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GafferHQ/gaffer","description":"Gaffer is an open source application framework designed specifically for creating tools for use in visual effects production.","fork":false,"url":"https://api.github.com/repos/GafferHQ/gaffer","forks_url":"https://api.github.com/repos/GafferHQ/gaffer/forks","keys_url":"https://api.github.com/repos/GafferHQ/gaffer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GafferHQ/gaffer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GafferHQ/gaffer/teams","hooks_url":"https://api.github.com/repos/GafferHQ/gaffer/hooks","issue_events_url":"https://api.github.com/repos/GafferHQ/gaffer/issues/events{/number}","events_url":"https://api.github.com/repos/GafferHQ/gaffer/events","assignees_url":"https://api.github.com/repos/GafferHQ/gaffer/assignees{/user}","branches_url":"https://api.github.com/repos/GafferHQ/gaffer/branches{/branch}","tags_url":"https://api.github.com/repos/GafferHQ/gaffer/tags","blobs_url":"https://api.github.com/repos/GafferHQ/gaffer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GafferHQ/gaffer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GafferHQ/gaffer/git/refs{/sha}","trees_url":"https://api.github.com/repos/GafferHQ/gaffer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GafferHQ/gaffer/statuses/{sha}","languages_url":"https://api.github.com/repos/GafferHQ/gaffer/languages","stargazers_url":"https://api.github.com/repos/GafferHQ/gaffer/stargazers","contributors_url":"https://api.github.com/repos/GafferHQ/gaffer/contributors","subscribers_url":"https://api.github.com/repos/GafferHQ/gaffer/subscribers","subscription_url":"https://api.github.com/repos/GafferHQ/gaffer/subscription","commits_url":"https://api.github.com/repos/GafferHQ/gaffer/commits{/sha}","git_commits_url":"https://api.github.com/repos/GafferHQ/gaffer/git/commits{/sha}","comments_url":"https://api.github.com/repos/GafferHQ/gaffer/comments{/number}","issue_comment_url":"https://api.github.com/repos/GafferHQ/gaffer/issues/comments{/number}","contents_url":"https://api.github.com/repos/GafferHQ/gaffer/contents/{+path}","compare_url":"https://api.github.com/repos/GafferHQ/gaffer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GafferHQ/gaffer/merges","archive_url":"https://api.github.com/repos/GafferHQ/gaffer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GafferHQ/gaffer/downloads","issues_url":"https://api.github.com/repos/GafferHQ/gaffer/issues{/number}","pulls_url":"https://api.github.com/repos/GafferHQ/gaffer/pulls{/number}","milestones_url":"https://api.github.com/repos/GafferHQ/gaffer/milestones{/number}","notifications_url":"https://api.github.com/repos/GafferHQ/gaffer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GafferHQ/gaffer/labels{/name}","releases_url":"https://api.github.com/repos/GafferHQ/gaffer/releases{/id}","deployments_url":"https://api.github.com/repos/GafferHQ/gaffer/deployments","created_at":"2013-03-27T00:04:53Z","updated_at":"2018-12-10T18:06:17Z","pushed_at":"2018-12-10T22:26:43Z","git_url":"git://github.com/GafferHQ/gaffer.git","ssh_url":"git@github.com:GafferHQ/gaffer.git","clone_url":"https://github.com/GafferHQ/gaffer.git","svn_url":"https://github.com/GafferHQ/gaffer","homepage":"http://www.gafferhq.org","size":37412,"stargazers_count":420,"watchers_count":420,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"archived":false,"open_issues_count":263,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":128,"open_issues":263,"watchers":420,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729"},"html":{"href":"https://github.com/GafferHQ/gaffer/pull/2729"},"issue":{"href":"https://api.github.com/repos/GafferHQ/gaffer/issues/2729"},"comments":{"href":"https://api.github.com/repos/GafferHQ/gaffer/issues/2729/comments"},"review_comments":{"href":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729/comments"},"review_comment":{"href":"https://api.github.com/repos/GafferHQ/gaffer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GafferHQ/gaffer/pulls/2729/commits"},"statuses":{"href":"https://api.github.com/repos/GafferHQ/gaffer/statuses/2ec0c0af867b4680a027ac2fbb8fb24c1cff3b15"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mattigruener"}}