{"action":"created","comment":{"url":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/comments/148232100","pull_request_review_id":73441137,"id":148232100,"diff_hunk":"@@ -3,87 +3,127 @@\n import pyblish.api\n import colorbleed.api\n import colorbleed.maya.lib as lib\n-import avalon.io as io\n \n \n-class ValidateAnimationOutSetRelatedNodeIds(pyblish.api.InstancePlugin):\n-    \"\"\"Validate rig out_SET nodes have related ids to current context\n+def get_parent(node):\n+    \"\"\"Get the parent node of the given node\n+    Args:\n+        node (str): full path of the node\n+\n+    Returns:\n+        str, full path if parent node\n+    \"\"\"\n+    return cmds.listRelatives(node, parent=True, fullPath=True)\n \n-    An ID is 'related' if its built in the current Item.\n \n-    Note that this doesn't ensure it's from the current Task. An ID created\n-    from `lookdev` has the same relation to the Item as one coming from others,\n-    like `rigging` or `modeling`.\n+class ValidateAnimationOutSetRelatedNodeIds(pyblish.api.InstancePlugin):\n+    \"\"\"Validate if nodes have related IDs to the source (original shapes)\n+\n+    Any intermediate shapes which are created when creating deformers on\n+    shapes will need to get the correct ID to ensure the look assignment still\n+    works on the new shape.\n \n     \"\"\"\n \n     order = colorbleed.api.ValidateContentsOrder\n-    families = ['colorbleed.animation']\n+    families = ['colorbleed.animation', \"colorbleed.pointcache\"]\n     hosts = ['maya']\n     label = 'Animation Out Set Related Node Ids'\n-    actions = [colorbleed.api.SelectInvalidAction]\n+    actions = [colorbleed.api.SelectInvalidAction, colorbleed.api.RepairAction]\n     optional = True\n \n     ignore_types = (\"constraint\",)\n \n     def process(self, instance):\n         \"\"\"Process all meshes\"\"\"\n \n-        # Ensure all nodes have a cbId\n+        # Ensure all nodes have a cbId and a related ID to the original shapes\n+        # if a deformer has been created on the shape\n         invalid = self.get_invalid(instance)\n         if invalid:\n             raise RuntimeError(\"Nodes found with non-related \"\n                                \"asset IDs: {0}\".format(invalid))\n \n     @classmethod\n-    def get_pointcache_nodes(cls, instance):\n-\n-        # Get out_SET\n-        sets = cmds.ls(instance, type='objectSet')\n-        pointcache_sets = [x for x in sets if x == 'out_SET']\n-\n-        nodes = list()\n-        for s in pointcache_sets:\n-            members = cmds.sets(s, query=True)\n-            members = cmds.ls(members, long=True)  # ensure long names\n-            descendents = cmds.listRelatives(members,\n-                                             allDescendents=True,\n-                                             fullPath=True) or []\n-            descendents = cmds.ls(descendents,\n-                                  noIntermediate=True,\n-                                  long=True)\n-            hierarchy = members + descendents\n-            nodes.extend(hierarchy)\n-\n-        # ignore certain node types (e.g. constraints)\n-        ignore = cmds.ls(nodes, type=cls.ignore_types, long=True)\n-        if ignore:\n-            ignore = set(ignore)\n-            nodes = [node for node in nodes if node not in ignore]\n-\n-        return nodes\n-\n-    @classmethod\n     def get_invalid(cls, instance):\n-        invalid_items = []\n+        \"\"\"Get all nodes which do not match the criteria\"\"\"\n+        invalid = []\n \n         # get asset id\n-        nodes = cls.get_pointcache_nodes(instance)\n+        nodes = instance.data.get(\"out_hierarchy\", instance[:])\n         for node in nodes:\n+            node_type = cmds.nodeType(node)\n             node_id = lib.get_id(node)\n+\n+            if node_type == \"mesh\" and not node_id:","path":"colorbleed/plugins/maya/publish/validate_animation_out_set_related_node_ids.py","position":96,"original_position":96,"commit_id":"8d127c89e843784381ed11e01a8443667cbbb687","original_commit_id":"8d127c89e843784381ed11e01a8443667cbbb687","user":{"login":"BigRoy","id":2439881,"avatar_url":"https://avatars0.githubusercontent.com/u/2439881?v=4","gravatar_id":"","url":"https://api.github.com/users/BigRoy","html_url":"https://github.com/BigRoy","followers_url":"https://api.github.com/users/BigRoy/followers","following_url":"https://api.github.com/users/BigRoy/following{/other_user}","gists_url":"https://api.github.com/users/BigRoy/gists{/gist_id}","starred_url":"https://api.github.com/users/BigRoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigRoy/subscriptions","organizations_url":"https://api.github.com/users/BigRoy/orgs","repos_url":"https://api.github.com/users/BigRoy/repos","events_url":"https://api.github.com/users/BigRoy/events{/privacy}","received_events_url":"https://api.github.com/users/BigRoy/received_events","type":"User","site_admin":false},"body":"> I have made it less explicit but still pretty explicit with obj_type = cmds.objectType(node, isAType=\"shape\") we want to check the shapes because the shapes get the shader ;)\r\n\r\nSure, I'm fine with explicit. The problem is more that the class/docstring wasn't described as one that is *so explicit*. With this type check the validation is *not* generic at all, it only considers shapes. If we go down that route I'd say it even needs to be \"deformable shapes\" and the validation is intended to only check for \"lost ids\" because of deformers.","created_at":"2017-11-01T10:59:13Z","updated_at":"2017-11-01T10:59:13Z","html_url":"https://github.com/Colorbleed/colorbleed-config/pull/37#discussion_r148232100","pull_request_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/comments/148232100"},"html":{"href":"https://github.com/Colorbleed/colorbleed-config/pull/37#discussion_r148232100"},"pull_request":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37"}},"in_reply_to_id":148218873},"pull_request":{"url":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37","id":149831951,"html_url":"https://github.com/Colorbleed/colorbleed-config/pull/37","diff_url":"https://github.com/Colorbleed/colorbleed-config/pull/37.diff","patch_url":"https://github.com/Colorbleed/colorbleed-config/pull/37.patch","issue_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/issues/37","number":37,"state":"open","locked":false,"title":"Add node id relationship comparison","user":{"login":"aardschok","id":26920875,"avatar_url":"https://avatars3.githubusercontent.com/u/26920875?v=4","gravatar_id":"","url":"https://api.github.com/users/aardschok","html_url":"https://github.com/aardschok","followers_url":"https://api.github.com/users/aardschok/followers","following_url":"https://api.github.com/users/aardschok/following{/other_user}","gists_url":"https://api.github.com/users/aardschok/gists{/gist_id}","starred_url":"https://api.github.com/users/aardschok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aardschok/subscriptions","organizations_url":"https://api.github.com/users/aardschok/orgs","repos_url":"https://api.github.com/users/aardschok/repos","events_url":"https://api.github.com/users/aardschok/events{/privacy}","received_events_url":"https://api.github.com/users/aardschok/received_events","type":"User","site_admin":false},"body":"* Solves ANM 07\r\n* Compare deformed shapes with original from history chain\r\n* Added repair action for check\r\n* Added `collect_animation` module to unify collection of hierarchy for both families","created_at":"2017-10-31T16:09:31Z","updated_at":"2017-11-01T10:59:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe144ef698301e55a770d52941da35efdeb4e0f5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37/commits","review_comments_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37/comments","review_comment_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/issues/37/comments","statuses_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/statuses/8d127c89e843784381ed11e01a8443667cbbb687","head":{"label":"aardschok:ANM-0007","ref":"ANM-0007","sha":"8d127c89e843784381ed11e01a8443667cbbb687","user":{"login":"aardschok","id":26920875,"avatar_url":"https://avatars3.githubusercontent.com/u/26920875?v=4","gravatar_id":"","url":"https://api.github.com/users/aardschok","html_url":"https://github.com/aardschok","followers_url":"https://api.github.com/users/aardschok/followers","following_url":"https://api.github.com/users/aardschok/following{/other_user}","gists_url":"https://api.github.com/users/aardschok/gists{/gist_id}","starred_url":"https://api.github.com/users/aardschok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aardschok/subscriptions","organizations_url":"https://api.github.com/users/aardschok/orgs","repos_url":"https://api.github.com/users/aardschok/repos","events_url":"https://api.github.com/users/aardschok/events{/privacy}","received_events_url":"https://api.github.com/users/aardschok/received_events","type":"User","site_admin":false},"repo":{"id":105262547,"name":"colorbleed-config","full_name":"aardschok/colorbleed-config","owner":{"login":"aardschok","id":26920875,"avatar_url":"https://avatars3.githubusercontent.com/u/26920875?v=4","gravatar_id":"","url":"https://api.github.com/users/aardschok","html_url":"https://github.com/aardschok","followers_url":"https://api.github.com/users/aardschok/followers","following_url":"https://api.github.com/users/aardschok/following{/other_user}","gists_url":"https://api.github.com/users/aardschok/gists{/gist_id}","starred_url":"https://api.github.com/users/aardschok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aardschok/subscriptions","organizations_url":"https://api.github.com/users/aardschok/orgs","repos_url":"https://api.github.com/users/aardschok/repos","events_url":"https://api.github.com/users/aardschok/events{/privacy}","received_events_url":"https://api.github.com/users/aardschok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aardschok/colorbleed-config","description":"Colorbleed Pipeline configuration for Avalon","fork":true,"url":"https://api.github.com/repos/aardschok/colorbleed-config","forks_url":"https://api.github.com/repos/aardschok/colorbleed-config/forks","keys_url":"https://api.github.com/repos/aardschok/colorbleed-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aardschok/colorbleed-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aardschok/colorbleed-config/teams","hooks_url":"https://api.github.com/repos/aardschok/colorbleed-config/hooks","issue_events_url":"https://api.github.com/repos/aardschok/colorbleed-config/issues/events{/number}","events_url":"https://api.github.com/repos/aardschok/colorbleed-config/events","assignees_url":"https://api.github.com/repos/aardschok/colorbleed-config/assignees{/user}","branches_url":"https://api.github.com/repos/aardschok/colorbleed-config/branches{/branch}","tags_url":"https://api.github.com/repos/aardschok/colorbleed-config/tags","blobs_url":"https://api.github.com/repos/aardschok/colorbleed-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aardschok/colorbleed-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aardschok/colorbleed-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/aardschok/colorbleed-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aardschok/colorbleed-config/statuses/{sha}","languages_url":"https://api.github.com/repos/aardschok/colorbleed-config/languages","stargazers_url":"https://api.github.com/repos/aardschok/colorbleed-config/stargazers","contributors_url":"https://api.github.com/repos/aardschok/colorbleed-config/contributors","subscribers_url":"https://api.github.com/repos/aardschok/colorbleed-config/subscribers","subscription_url":"https://api.github.com/repos/aardschok/colorbleed-config/subscription","commits_url":"https://api.github.com/repos/aardschok/colorbleed-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/aardschok/colorbleed-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/aardschok/colorbleed-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/aardschok/colorbleed-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/aardschok/colorbleed-config/contents/{+path}","compare_url":"https://api.github.com/repos/aardschok/colorbleed-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aardschok/colorbleed-config/merges","archive_url":"https://api.github.com/repos/aardschok/colorbleed-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aardschok/colorbleed-config/downloads","issues_url":"https://api.github.com/repos/aardschok/colorbleed-config/issues{/number}","pulls_url":"https://api.github.com/repos/aardschok/colorbleed-config/pulls{/number}","milestones_url":"https://api.github.com/repos/aardschok/colorbleed-config/milestones{/number}","notifications_url":"https://api.github.com/repos/aardschok/colorbleed-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aardschok/colorbleed-config/labels{/name}","releases_url":"https://api.github.com/repos/aardschok/colorbleed-config/releases{/id}","deployments_url":"https://api.github.com/repos/aardschok/colorbleed-config/deployments","created_at":"2017-09-29T10:56:26Z","updated_at":"2017-09-29T10:56:28Z","pushed_at":"2017-11-01T09:41:06Z","git_url":"git://github.com/aardschok/colorbleed-config.git","ssh_url":"git@github.com:aardschok/colorbleed-config.git","clone_url":"https://github.com/aardschok/colorbleed-config.git","svn_url":"https://github.com/aardschok/colorbleed-config","homepage":null,"size":603,"stargazers_count":0,"watchers_count":0,"language":"Python","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,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Colorbleed:master","ref":"master","sha":"7c9276b699cedf00848b4789cf24e1b1c42e828f","user":{"login":"Colorbleed","id":26379769,"avatar_url":"https://avatars3.githubusercontent.com/u/26379769?v=4","gravatar_id":"","url":"https://api.github.com/users/Colorbleed","html_url":"https://github.com/Colorbleed","followers_url":"https://api.github.com/users/Colorbleed/followers","following_url":"https://api.github.com/users/Colorbleed/following{/other_user}","gists_url":"https://api.github.com/users/Colorbleed/gists{/gist_id}","starred_url":"https://api.github.com/users/Colorbleed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Colorbleed/subscriptions","organizations_url":"https://api.github.com/users/Colorbleed/orgs","repos_url":"https://api.github.com/users/Colorbleed/repos","events_url":"https://api.github.com/users/Colorbleed/events{/privacy}","received_events_url":"https://api.github.com/users/Colorbleed/received_events","type":"Organization","site_admin":false},"repo":{"id":105155896,"name":"colorbleed-config","full_name":"Colorbleed/colorbleed-config","owner":{"login":"Colorbleed","id":26379769,"avatar_url":"https://avatars3.githubusercontent.com/u/26379769?v=4","gravatar_id":"","url":"https://api.github.com/users/Colorbleed","html_url":"https://github.com/Colorbleed","followers_url":"https://api.github.com/users/Colorbleed/followers","following_url":"https://api.github.com/users/Colorbleed/following{/other_user}","gists_url":"https://api.github.com/users/Colorbleed/gists{/gist_id}","starred_url":"https://api.github.com/users/Colorbleed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Colorbleed/subscriptions","organizations_url":"https://api.github.com/users/Colorbleed/orgs","repos_url":"https://api.github.com/users/Colorbleed/repos","events_url":"https://api.github.com/users/Colorbleed/events{/privacy}","received_events_url":"https://api.github.com/users/Colorbleed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Colorbleed/colorbleed-config","description":"Colorbleed Pipeline configuration for Avalon","fork":false,"url":"https://api.github.com/repos/Colorbleed/colorbleed-config","forks_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/forks","keys_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/teams","hooks_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/hooks","issue_events_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/issues/events{/number}","events_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/events","assignees_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/assignees{/user}","branches_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/branches{/branch}","tags_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/tags","blobs_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/statuses/{sha}","languages_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/languages","stargazers_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/stargazers","contributors_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/contributors","subscribers_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/subscribers","subscription_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/subscription","commits_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/contents/{+path}","compare_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/merges","archive_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/downloads","issues_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/issues{/number}","pulls_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls{/number}","milestones_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/milestones{/number}","notifications_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/labels{/name}","releases_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/releases{/id}","deployments_url":"https://api.github.com/repos/Colorbleed/colorbleed-config/deployments","created_at":"2017-09-28T14:04:00Z","updated_at":"2017-10-27T10:59:22Z","pushed_at":"2017-11-01T09:41:07Z","git_url":"git://github.com/Colorbleed/colorbleed-config.git","ssh_url":"git@github.com:Colorbleed/colorbleed-config.git","clone_url":"https://github.com/Colorbleed/colorbleed-config.git","svn_url":"https://github.com/Colorbleed/colorbleed-config","homepage":null,"size":583,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37"},"html":{"href":"https://github.com/Colorbleed/colorbleed-config/pull/37"},"issue":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/issues/37"},"comments":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/Colorbleed/colorbleed-config/statuses/8d127c89e843784381ed11e01a8443667cbbb687"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"BigRoy"}}