{"action":"created","comment":{"url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments/78398434","id":78398434,"diff_hunk":"@@ -75,60 +79,134 @@ def login_user():\n     Logs in the user to Shotgun and starts the engine.\n     \"\"\"\n \n-    # Needed global to re-import the toolkit core later.\n-    global sgtk\n+    # Needed global to create the main progress bar.\n+    global main_progress_bar\n \n     try:\n-        # When the user is not yet authenticated, pop up the Shotgun login dialog to get the user's credentials,\n+        # When the user is not yet authenticated,\n+        # pop up the Shotgun login dialog to get the user's credentials,\n         # otherwise, get the cached user's credentials.\n         user = sgtk.authentication.ShotgunAuthenticator().get_user()\n \n     except sgtk.authentication.AuthenticationCancelled:\n-        # When the user cancelled the Shotgun login dialog, keep around the displayed login menu.\n+        # When the user cancelled the Shotgun login dialog,\n+        # keep around the displayed login menu.\n         standalone_logger.info(\"Shotgun login was cancelled by the user.\")\n         return\n \n-    try:\n+    # Get rid of the displayed login menu since the engine menu will take over.\n+    delete_login_menu()\n+\n+    # Create a non-interruptable main progress bar (normally in the Help Line).\n+    main_progress_bar = pm.ui.MainProgressBar(minValue=0, maxValue=100, interruptable=False)\n+    main_progress_bar.beginProgress()\n+\n+    # Before bootstrapping the engine for the first time around,\n+    # the toolkit manager may swap the toolkit core to its latest version.\n+    plugin_engine.bootstrap(user,\n+                            progress_callback=handle_bootstrap_progress,\n+                            completed_callback=handle_bootstrap_completed,\n+                            failed_callback=handle_bootstrap_failed)\n+\n+\n+def handle_bootstrap_progress(step_number, message, current_index, maximum_index):\n+    \"\"\"\n+    Callback function that reports back on the toolkit and engine bootstrap progress.\n+\n+    This function is executed in the main thread by the main event loop.\n+\n+    :param step_number: Current progress step number,\n+                        from 1 to ``sgtk.bootstrap.ToolkitManager.MAX_PROGRESS_STEP_NUMBER``.\n+    :param message: Progress message to report.\n+    :param current_index: Optional current item number being looped over.\n+    :param maximum_index: Optional maximum item number being looped over.\n+    \"\"\"\n+\n+    if maximum_index and maximum_index > 1:\n+        message = \"%s (%s of %s)\" % (message, current_index+1, maximum_index+1)\n+\n+    message = \"Bootstrapping %s: %s\" % (manifest.engine_name, message)","path":"plugins/basic/python/tk_maya_basic/plugin_logic.py","position":73,"original_position":73,"commit_id":"1a85011c951c7bb283ebfd329dd2fb988c312ed0","original_commit_id":"1a85011c951c7bb283ebfd329dd2fb988c312ed0","user":{"login":"fpainchaud","id":20173280,"avatar_url":"https://avatars.githubusercontent.com/u/20173280?v=3","gravatar_id":"","url":"https://api.github.com/users/fpainchaud","html_url":"https://github.com/fpainchaud","followers_url":"https://api.github.com/users/fpainchaud/followers","following_url":"https://api.github.com/users/fpainchaud/following{/other_user}","gists_url":"https://api.github.com/users/fpainchaud/gists{/gist_id}","starred_url":"https://api.github.com/users/fpainchaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpainchaud/subscriptions","organizations_url":"https://api.github.com/users/fpainchaud/orgs","repos_url":"https://api.github.com/users/fpainchaud/repos","events_url":"https://api.github.com/users/fpainchaud/events{/privacy}","received_events_url":"https://api.github.com/users/fpainchaud/received_events","type":"User","site_admin":false},"body":"This is the list of messages that are displayed aside the main progress bar on Maya Help line as the bootstrap progresses:\r\n\r\n> Bootstrapping tk-maya: Resolving project...\r\n> Bootstrapping tk-maya: Resolving configuration...\r\n> Bootstrapping tk-maya: Updating configuration...\r\n> Bootstrapping tk-maya: Starting up Toolkit...\r\n> Bootstrapping tk-maya: Downloading tk-maya v0.5.10 (1 of 5)...\r\n> Bootstrapping tk-maya: Downloading tk-multi-shotgunpanel v1.2.6 (2 of 5)...\r\n> Bootstrapping tk-maya: Downloading tk-multi-loader2 v1.11.2 (3 of 5)...\r\n> Bootstrapping tk-maya: Downloading tk-framework-shotgunutils v4.3.1 (4 of 5)...\r\n> Bootstrapping tk-maya: Downloading tk-framework-qtwidgets v2.2.1 (5 of 5)...\r\n> Bootstrapping tk-maya: Resolving context...\r\n> Bootstrapping tk-maya: Launching Engine...\r\n\r\nUpdating to say \"Initializing Shotgun:\".\r\n","created_at":"2016-09-12T15:46:16Z","updated_at":"2016-09-12T15:46:16Z","html_url":"https://github.com/shotgunsoftware/tk-maya/pull/20#discussion_r78398434","pull_request_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments/78398434"},"html":{"href":"https://github.com/shotgunsoftware/tk-maya/pull/20#discussion_r78398434"},"pull_request":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20","id":84080322,"html_url":"https://github.com/shotgunsoftware/tk-maya/pull/20","diff_url":"https://github.com/shotgunsoftware/tk-maya/pull/20.diff","patch_url":"https://github.com/shotgunsoftware/tk-maya/pull/20.patch","issue_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/20","number":20,"state":"open","locked":false,"title":"#34893: Run toolkit manager bootstrap logic in a background thread. (merges into develop/plugin)","user":{"login":"manneohrstrom","id":337710,"avatar_url":"https://avatars.githubusercontent.com/u/337710?v=3","gravatar_id":"","url":"https://api.github.com/users/manneohrstrom","html_url":"https://github.com/manneohrstrom","followers_url":"https://api.github.com/users/manneohrstrom/followers","following_url":"https://api.github.com/users/manneohrstrom/following{/other_user}","gists_url":"https://api.github.com/users/manneohrstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/manneohrstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manneohrstrom/subscriptions","organizations_url":"https://api.github.com/users/manneohrstrom/orgs","repos_url":"https://api.github.com/users/manneohrstrom/repos","events_url":"https://api.github.com/users/manneohrstrom/events{/privacy}","received_events_url":"https://api.github.com/users/manneohrstrom/received_events","type":"User","site_admin":false},"body":"Same as #19 but merging into `develop/plugin` instead of master.","created_at":"2016-09-06T08:29:32Z","updated_at":"2016-09-12T15:46:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbc3c812ae7d15cf5792db4159b19b05b66e8171","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20/commits","review_comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20/comments","review_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/20/comments","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/1a85011c951c7bb283ebfd329dd2fb988c312ed0","head":{"label":"shotgunsoftware:34893_bootstrap_background_thread","ref":"34893_bootstrap_background_thread","sha":"1a85011c951c7bb283ebfd329dd2fb988c312ed0","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":4399199,"name":"tk-maya","full_name":"shotgunsoftware/tk-maya","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-maya","description":"A Shotgun Pipeline Toolkit Engine for Maya","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-maya","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/deployments","created_at":"2012-05-21T21:52:36Z","updated_at":"2016-08-30T14:48:21Z","pushed_at":"2016-09-06T08:29:32Z","git_url":"git://github.com/shotgunsoftware/tk-maya.git","ssh_url":"git@github.com:shotgunsoftware/tk-maya.git","clone_url":"https://github.com/shotgunsoftware/tk-maya.git","svn_url":"https://github.com/shotgunsoftware/tk-maya","homepage":"","size":26641,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":13,"default_branch":"master"}},"base":{"label":"shotgunsoftware:develop/plugin","ref":"develop/plugin","sha":"3259a64f68816cb807fac770026f7143e889312e","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":4399199,"name":"tk-maya","full_name":"shotgunsoftware/tk-maya","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-maya","description":"A Shotgun Pipeline Toolkit Engine for Maya","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-maya","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/deployments","created_at":"2012-05-21T21:52:36Z","updated_at":"2016-08-30T14:48:21Z","pushed_at":"2016-09-06T08:29:32Z","git_url":"git://github.com/shotgunsoftware/tk-maya.git","ssh_url":"git@github.com:shotgunsoftware/tk-maya.git","clone_url":"https://github.com/shotgunsoftware/tk-maya.git","svn_url":"https://github.com/shotgunsoftware/tk-maya","homepage":"","size":26641,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20"},"html":{"href":"https://github.com/shotgunsoftware/tk-maya/pull/20"},"issue":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/20"},"comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/1a85011c951c7bb283ebfd329dd2fb988c312ed0"}}}}
{"actor":{"display_login":"fpainchaud"}}