{"action":"created","comment":{"url":"https://api.github.com/repos/godotengine/godot/pulls/comments/192558924","pull_request_review_id":125365130,"id":192558924,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjU1ODkyNA==","diff_hunk":"@@ -523,6 +523,76 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {\n \t\t\tif (dupsingle)\n \t\t\t\teditor->push_item(dupsingle);\n \n+\t\t} break;\n+\t\tcase TOOL_COPY: {\n+\n+\t\t\tif (!edited_scene)\n+\t\t\t\tbreak;\n+\n+\t\t\tif (editor_selection->is_selected(edited_scene)) {\n+\t\t\t\tcurrent_option = -1;\n+\t\t\t\taccept->get_ok()->set_text(TTR(\"I see...\"));\n+\t\t\t\taccept->set_text(TTR(\"This operation can't be done on the tree root.\"));\n+\t\t\t\taccept->popup_centered_minsize();\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\tif (!_validate_no_foreign())\n+\t\t\t\tbreak;\n+\n+\t\t\tList<Node *> selection = editor_selection->get_selected_node_list();\n+\t\t\tif (selection.size() == 0)\n+\t\t\t\tbreak;\n+\n+\t\t\tif (!copied_nodes.empty())\n+\t\t\t\tcopied_nodes.clear();\n+\n+\t\t\tcopied_nodes = selection;\n+\n+\t\t} break;\n+\t\tcase TOOL_PASTE: {\n+\n+\t\t\tif (!edited_scene)\n+\t\t\t\tbreak;\n+\t\t\tif (copied_nodes.empty()) {\n+\t\t\t\tcurrent_option = -1;\n+\t\t\t\taccept->get_ok()->set_text(TTR(\"I see...\"));\n+\t\t\t\taccept->set_text(TTR(\"Nothing in copy. Sorry Dude. Copy Something First.\"));\n+\t\t\t\taccept->popup_centered_minsize();\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\tif (!_validate_no_foreign())\n+\t\t\t\tbreak;\n+\n+\t\t\tList<Node *> selection = editor_selection->get_selected_node_list();\n+\t\t\tif (selection.size() != 1)\n+\t\t\t\tbreak;\n+\n+\t\t\t_node_paste(selection, false);\n+\n+\t\t} break;\n+\t\tcase TOOL_PASTE_KGT: {\n+\n+\t\t\tif (!edited_scene)\n+\t\t\t\tbreak;\n+\t\t\tif (copied_nodes.empty()) {\n+\t\t\t\tcurrent_option = -1;\n+\t\t\t\taccept->get_ok()->set_text(TTR(\"I see...\"));\n+\t\t\t\taccept->set_text(TTR(\"Nothing in copy. Sorry Dude. Copy Something First.\"));","path":"editor/scene_tree_dock.cpp","position":38,"original_position":60,"commit_id":"d1477d50f5c738f7536b09594c0b365ad01c79f9","original_commit_id":"7d6bbd192c343258e40490641ba9d44e9057487a","user":{"login":"swarnimarun","id":19930870,"node_id":"MDQ6VXNlcjE5OTMwODcw","avatar_url":"https://avatars2.githubusercontent.com/u/19930870?v=4","gravatar_id":"","url":"https://api.github.com/users/swarnimarun","html_url":"https://github.com/swarnimarun","followers_url":"https://api.github.com/users/swarnimarun/followers","following_url":"https://api.github.com/users/swarnimarun/following{/other_user}","gists_url":"https://api.github.com/users/swarnimarun/gists{/gist_id}","starred_url":"https://api.github.com/users/swarnimarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swarnimarun/subscriptions","organizations_url":"https://api.github.com/users/swarnimarun/orgs","repos_url":"https://api.github.com/users/swarnimarun/repos","events_url":"https://api.github.com/users/swarnimarun/events{/privacy}","received_events_url":"https://api.github.com/users/swarnimarun/received_events","type":"User","site_admin":false},"body":"I forgot to change it sorry. I was just place holder back then.","created_at":"2018-06-02T12:50:01Z","updated_at":"2018-06-02T12:50:02Z","html_url":"https://github.com/godotengine/godot/pull/19327#discussion_r192558924","pull_request_url":"https://api.github.com/repos/godotengine/godot/pulls/19327","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/godotengine/godot/pulls/comments/192558924"},"html":{"href":"https://github.com/godotengine/godot/pull/19327#discussion_r192558924"},"pull_request":{"href":"https://api.github.com/repos/godotengine/godot/pulls/19327"}},"in_reply_to_id":192558061},"pull_request":{"url":"https://api.github.com/repos/godotengine/godot/pulls/19327","id":192183824,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMTgzODI0","html_url":"https://github.com/godotengine/godot/pull/19327","diff_url":"https://github.com/godotengine/godot/pull/19327.diff","patch_url":"https://github.com/godotengine/godot/pull/19327.patch","issue_url":"https://api.github.com/repos/godotengine/godot/issues/19327","number":19327,"state":"open","locked":false,"title":"Basic Copy Paste feature","user":{"login":"swarnimarun","id":19930870,"node_id":"MDQ6VXNlcjE5OTMwODcw","avatar_url":"https://avatars2.githubusercontent.com/u/19930870?v=4","gravatar_id":"","url":"https://api.github.com/users/swarnimarun","html_url":"https://github.com/swarnimarun","followers_url":"https://api.github.com/users/swarnimarun/followers","following_url":"https://api.github.com/users/swarnimarun/following{/other_user}","gists_url":"https://api.github.com/users/swarnimarun/gists{/gist_id}","starred_url":"https://api.github.com/users/swarnimarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swarnimarun/subscriptions","organizations_url":"https://api.github.com/users/swarnimarun/orgs","repos_url":"https://api.github.com/users/swarnimarun/repos","events_url":"https://api.github.com/users/swarnimarun/events{/privacy}","received_events_url":"https://api.github.com/users/swarnimarun/received_events","type":"User","site_admin":false},"body":"There are a few issues with creating a proper copy and paste some also cause of my limited skill but I created this PR just for the basic Copy-Paste feature.\r\nI have tried my best to use the existing API rather than add new things to the system to bloat it up.\r\nHopefully there isn't any problems, this is my first serious PR. Sorry in advance for wasting anyone's time.\r\n\r\nI also added some new icons hope no one minds. I am not sure if there is a design philosophy behind the designs but I tried to maintain some uniformity.\r\n\r\n#### The caveats with it are,\r\n\r\n- Inter-scene copy-paste is not there.\r\n- Root can't be copied.\r\n- And finally if you change scene or close it you lose the copied data.\r\n\r\n~~I would really like to fix the problems with the inter-scene stuff.~~\r\nFigured that there is only way that is to save data of the nodes separately and use it to create nodes in the specific scene but this will require creating more than I did like to do now. \r\nSo I will work on that later. For this I don't think much more can be done.","created_at":"2018-06-02T06:49:07Z","updated_at":"2018-06-02T12:50:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2213ffa2e7162df34af38472b9504788e724fdd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/godotengine/godot/pulls/19327/commits","review_comments_url":"https://api.github.com/repos/godotengine/godot/pulls/19327/comments","review_comment_url":"https://api.github.com/repos/godotengine/godot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/19327/comments","statuses_url":"https://api.github.com/repos/godotengine/godot/statuses/d1477d50f5c738f7536b09594c0b365ad01c79f9","head":{"label":"swarnimarun:copy-paste","ref":"copy-paste","sha":"d1477d50f5c738f7536b09594c0b365ad01c79f9","user":{"login":"swarnimarun","id":19930870,"node_id":"MDQ6VXNlcjE5OTMwODcw","avatar_url":"https://avatars2.githubusercontent.com/u/19930870?v=4","gravatar_id":"","url":"https://api.github.com/users/swarnimarun","html_url":"https://github.com/swarnimarun","followers_url":"https://api.github.com/users/swarnimarun/followers","following_url":"https://api.github.com/users/swarnimarun/following{/other_user}","gists_url":"https://api.github.com/users/swarnimarun/gists{/gist_id}","starred_url":"https://api.github.com/users/swarnimarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swarnimarun/subscriptions","organizations_url":"https://api.github.com/users/swarnimarun/orgs","repos_url":"https://api.github.com/users/swarnimarun/repos","events_url":"https://api.github.com/users/swarnimarun/events{/privacy}","received_events_url":"https://api.github.com/users/swarnimarun/received_events","type":"User","site_admin":false},"repo":{"id":131625186,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE2MjUxODY=","name":"godot","full_name":"swarnimarun/godot","owner":{"login":"swarnimarun","id":19930870,"node_id":"MDQ6VXNlcjE5OTMwODcw","avatar_url":"https://avatars2.githubusercontent.com/u/19930870?v=4","gravatar_id":"","url":"https://api.github.com/users/swarnimarun","html_url":"https://github.com/swarnimarun","followers_url":"https://api.github.com/users/swarnimarun/followers","following_url":"https://api.github.com/users/swarnimarun/following{/other_user}","gists_url":"https://api.github.com/users/swarnimarun/gists{/gist_id}","starred_url":"https://api.github.com/users/swarnimarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swarnimarun/subscriptions","organizations_url":"https://api.github.com/users/swarnimarun/orgs","repos_url":"https://api.github.com/users/swarnimarun/repos","events_url":"https://api.github.com/users/swarnimarun/events{/privacy}","received_events_url":"https://api.github.com/users/swarnimarun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/swarnimarun/godot","description":"This repo is my plaything for testing godot.","fork":true,"url":"https://api.github.com/repos/swarnimarun/godot","forks_url":"https://api.github.com/repos/swarnimarun/godot/forks","keys_url":"https://api.github.com/repos/swarnimarun/godot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swarnimarun/godot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swarnimarun/godot/teams","hooks_url":"https://api.github.com/repos/swarnimarun/godot/hooks","issue_events_url":"https://api.github.com/repos/swarnimarun/godot/issues/events{/number}","events_url":"https://api.github.com/repos/swarnimarun/godot/events","assignees_url":"https://api.github.com/repos/swarnimarun/godot/assignees{/user}","branches_url":"https://api.github.com/repos/swarnimarun/godot/branches{/branch}","tags_url":"https://api.github.com/repos/swarnimarun/godot/tags","blobs_url":"https://api.github.com/repos/swarnimarun/godot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swarnimarun/godot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swarnimarun/godot/git/refs{/sha}","trees_url":"https://api.github.com/repos/swarnimarun/godot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swarnimarun/godot/statuses/{sha}","languages_url":"https://api.github.com/repos/swarnimarun/godot/languages","stargazers_url":"https://api.github.com/repos/swarnimarun/godot/stargazers","contributors_url":"https://api.github.com/repos/swarnimarun/godot/contributors","subscribers_url":"https://api.github.com/repos/swarnimarun/godot/subscribers","subscription_url":"https://api.github.com/repos/swarnimarun/godot/subscription","commits_url":"https://api.github.com/repos/swarnimarun/godot/commits{/sha}","git_commits_url":"https://api.github.com/repos/swarnimarun/godot/git/commits{/sha}","comments_url":"https://api.github.com/repos/swarnimarun/godot/comments{/number}","issue_comment_url":"https://api.github.com/repos/swarnimarun/godot/issues/comments{/number}","contents_url":"https://api.github.com/repos/swarnimarun/godot/contents/{+path}","compare_url":"https://api.github.com/repos/swarnimarun/godot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swarnimarun/godot/merges","archive_url":"https://api.github.com/repos/swarnimarun/godot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swarnimarun/godot/downloads","issues_url":"https://api.github.com/repos/swarnimarun/godot/issues{/number}","pulls_url":"https://api.github.com/repos/swarnimarun/godot/pulls{/number}","milestones_url":"https://api.github.com/repos/swarnimarun/godot/milestones{/number}","notifications_url":"https://api.github.com/repos/swarnimarun/godot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swarnimarun/godot/labels{/name}","releases_url":"https://api.github.com/repos/swarnimarun/godot/releases{/id}","deployments_url":"https://api.github.com/repos/swarnimarun/godot/deployments","created_at":"2018-04-30T17:23:40Z","updated_at":"2018-05-17T13:59:51Z","pushed_at":"2018-06-02T07:08:47Z","git_url":"git://github.com/swarnimarun/godot.git","ssh_url":"git@github.com:swarnimarun/godot.git","clone_url":"https://github.com/swarnimarun/godot.git","svn_url":"https://github.com/swarnimarun/godot","homepage":"","size":241709,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"godotengine:master","ref":"master","sha":"8684b631182dffebba27bdf538129818321d0d7d","user":{"login":"godotengine","id":6318500,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMTg1MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/6318500?v=4","gravatar_id":"","url":"https://api.github.com/users/godotengine","html_url":"https://github.com/godotengine","followers_url":"https://api.github.com/users/godotengine/followers","following_url":"https://api.github.com/users/godotengine/following{/other_user}","gists_url":"https://api.github.com/users/godotengine/gists{/gist_id}","starred_url":"https://api.github.com/users/godotengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godotengine/subscriptions","organizations_url":"https://api.github.com/users/godotengine/orgs","repos_url":"https://api.github.com/users/godotengine/repos","events_url":"https://api.github.com/users/godotengine/events{/privacy}","received_events_url":"https://api.github.com/users/godotengine/received_events","type":"Organization","site_admin":false},"repo":{"id":15634981,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYzNDk4MQ==","name":"godot","full_name":"godotengine/godot","owner":{"login":"godotengine","id":6318500,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMTg1MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/6318500?v=4","gravatar_id":"","url":"https://api.github.com/users/godotengine","html_url":"https://github.com/godotengine","followers_url":"https://api.github.com/users/godotengine/followers","following_url":"https://api.github.com/users/godotengine/following{/other_user}","gists_url":"https://api.github.com/users/godotengine/gists{/gist_id}","starred_url":"https://api.github.com/users/godotengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godotengine/subscriptions","organizations_url":"https://api.github.com/users/godotengine/orgs","repos_url":"https://api.github.com/users/godotengine/repos","events_url":"https://api.github.com/users/godotengine/events{/privacy}","received_events_url":"https://api.github.com/users/godotengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/godotengine/godot","description":"Godot Engine – Multi-platform 2D and 3D game engine","fork":false,"url":"https://api.github.com/repos/godotengine/godot","forks_url":"https://api.github.com/repos/godotengine/godot/forks","keys_url":"https://api.github.com/repos/godotengine/godot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/godotengine/godot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/godotengine/godot/teams","hooks_url":"https://api.github.com/repos/godotengine/godot/hooks","issue_events_url":"https://api.github.com/repos/godotengine/godot/issues/events{/number}","events_url":"https://api.github.com/repos/godotengine/godot/events","assignees_url":"https://api.github.com/repos/godotengine/godot/assignees{/user}","branches_url":"https://api.github.com/repos/godotengine/godot/branches{/branch}","tags_url":"https://api.github.com/repos/godotengine/godot/tags","blobs_url":"https://api.github.com/repos/godotengine/godot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/godotengine/godot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/godotengine/godot/git/refs{/sha}","trees_url":"https://api.github.com/repos/godotengine/godot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/godotengine/godot/statuses/{sha}","languages_url":"https://api.github.com/repos/godotengine/godot/languages","stargazers_url":"https://api.github.com/repos/godotengine/godot/stargazers","contributors_url":"https://api.github.com/repos/godotengine/godot/contributors","subscribers_url":"https://api.github.com/repos/godotengine/godot/subscribers","subscription_url":"https://api.github.com/repos/godotengine/godot/subscription","commits_url":"https://api.github.com/repos/godotengine/godot/commits{/sha}","git_commits_url":"https://api.github.com/repos/godotengine/godot/git/commits{/sha}","comments_url":"https://api.github.com/repos/godotengine/godot/comments{/number}","issue_comment_url":"https://api.github.com/repos/godotengine/godot/issues/comments{/number}","contents_url":"https://api.github.com/repos/godotengine/godot/contents/{+path}","compare_url":"https://api.github.com/repos/godotengine/godot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/godotengine/godot/merges","archive_url":"https://api.github.com/repos/godotengine/godot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/godotengine/godot/downloads","issues_url":"https://api.github.com/repos/godotengine/godot/issues{/number}","pulls_url":"https://api.github.com/repos/godotengine/godot/pulls{/number}","milestones_url":"https://api.github.com/repos/godotengine/godot/milestones{/number}","notifications_url":"https://api.github.com/repos/godotengine/godot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/godotengine/godot/labels{/name}","releases_url":"https://api.github.com/repos/godotengine/godot/releases{/id}","deployments_url":"https://api.github.com/repos/godotengine/godot/deployments","created_at":"2014-01-04T16:05:36Z","updated_at":"2018-06-02T06:26:30Z","pushed_at":"2018-06-02T10:54:42Z","git_url":"git://github.com/godotengine/godot.git","ssh_url":"git@github.com:godotengine/godot.git","clone_url":"https://github.com/godotengine/godot.git","svn_url":"https://github.com/godotengine/godot","homepage":"https://godotengine.org","size":242015,"stargazers_count":15251,"watchers_count":15251,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3176,"mirror_url":null,"archived":false,"open_issues_count":3563,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3176,"open_issues":3563,"watchers":15251,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/godotengine/godot/pulls/19327"},"html":{"href":"https://github.com/godotengine/godot/pull/19327"},"issue":{"href":"https://api.github.com/repos/godotengine/godot/issues/19327"},"comments":{"href":"https://api.github.com/repos/godotengine/godot/issues/19327/comments"},"review_comments":{"href":"https://api.github.com/repos/godotengine/godot/pulls/19327/comments"},"review_comment":{"href":"https://api.github.com/repos/godotengine/godot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/godotengine/godot/pulls/19327/commits"},"statuses":{"href":"https://api.github.com/repos/godotengine/godot/statuses/d1477d50f5c738f7536b09594c0b365ad01c79f9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"swarnimarun"}}