{"action":"created","issue":{"url":"https://api.github.com/repos/pyblish/pyblish-magenta/issues/17","labels_url":"https://api.github.com/repos/pyblish/pyblish-magenta/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/pyblish/pyblish-magenta/issues/17/comments","events_url":"https://api.github.com/repos/pyblish/pyblish-magenta/issues/17/events","html_url":"https://github.com/pyblish/pyblish-magenta/issues/17","id":93090418,"number":17,"title":"Encapsulating Collection","user":{"login":"mottosso","id":2152766,"avatar_url":"https://avatars.githubusercontent.com/u/2152766?v=3","gravatar_id":"","url":"https://api.github.com/users/mottosso","html_url":"https://github.com/mottosso","followers_url":"https://api.github.com/users/mottosso/followers","following_url":"https://api.github.com/users/mottosso/following{/other_user}","gists_url":"https://api.github.com/users/mottosso/gists{/gist_id}","starred_url":"https://api.github.com/users/mottosso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mottosso/subscriptions","organizations_url":"https://api.github.com/users/mottosso/orgs","repos_url":"https://api.github.com/users/mottosso/repos","events_url":"https://api.github.com/users/mottosso/events{/privacy}","received_events_url":"https://api.github.com/users/mottosso/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pyblish/pyblish-magenta/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-07-05T08:22:08Z","updated_at":"2015-07-06T12:53:30Z","closed_at":null,"body":"### Goal\r\n\r\nTo capture everything during collection and to decouple validators from host.\r\n\r\n### Benefits\r\n\r\nAt the moment, Validators may validate things unrelated to an instance.\r\n\r\nFor example, in the case of a rig and a number of utility nodes, such as measurements, the utility nodes aren't included in the Instance and will not get extracted, yet they are still subject to validation as each Validator handles their own collection.\r\n\r\nWhen centralised, measurements and other unrelated nodes can be explicitly discarded and thus never subject to validation. The concept can then extend into more advanced use, where the end result is an Instance that fully captures what the Instance represents.\r\n\r\n### Implementation\r\n\r\nCurrently, collectors gather a minimum amount of information in the scene, leaving most of the gathering to Validators.\r\n\r\nFor example, a validator could look like this.\r\n\r\n```python\r\nfor node in cmds.ls(type=\"mesh\"):\r\n  assert cmds.getAttr(node + \".color\") == \"green\", \"%s is not green\" % node\r\n```\r\n\r\nWhich manually gathers additional information beyond what is available form Collection. Instead, a validator could look like this.\r\n\r\n```python\r\nfor node in instance:\r\n  assert node.color == \"green\", \"%s is not green\" % node\r\n```\r\n\r\nFor which a Collector could look like this.\r\n\r\n```python\r\nfor node in cmds.ls():\r\n  node = type(\"MayaNode\", (object,), {})\r\n  node.color = \"green\"\r\n  instance.add(node)\r\n```\r\n\r\n`color` then represents static data to be validated at a later point."},"comment":{"url":"https://api.github.com/repos/pyblish/pyblish-magenta/issues/comments/118845591","html_url":"https://github.com/pyblish/pyblish-magenta/issues/17#issuecomment-118845591","issue_url":"https://api.github.com/repos/pyblish/pyblish-magenta/issues/17","id":118845591,"user":{"login":"BigRoy","id":2439881,"avatar_url":"https://avatars.githubusercontent.com/u/2439881?v=3","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},"created_at":"2015-07-06T12:53:30Z","updated_at":"2015-07-06T12:53:30Z","body":"> You should be seeing a \"spinning wheel\" during collection, but other than that I think you're right, this is important to consider as well.\r\n\r\nIt might help if it would be clearer that it's actually already collecting data through *Collectors*. Maybe it could even show which are processing. This clarifies to the artists that it's already processing as opposed to just initializing the GUI."}}