{"action":"created","issue":{"url":"https://api.github.com/repos/abstractfactory/pyblish/issues/142","labels_url":"https://api.github.com/repos/abstractfactory/pyblish/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/abstractfactory/pyblish/issues/142/comments","events_url":"https://api.github.com/repos/abstractfactory/pyblish/issues/142/events","html_url":"https://github.com/abstractfactory/pyblish/issues/142","id":56922706,"number":142,"title":"Feedback plug-ins","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/abstractfactory/pyblish/labels/feature","name":"feature","color":"c7def8"},{"url":"https://api.github.com/repos/abstractfactory/pyblish/labels/proposal","name":"proposal","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-07T19:31:00Z","updated_at":"2015-02-08T18:36:22Z","closed_at":null,"body":"# Goal\r\n\r\nTo facilitate software agnosticism by separating actions that rely on a host from general-purpose plug-ins.\r\n\r\nFor example, consider a `Validate Naming Convention` plug-in. The process may look something like this.\r\n\r\n1. Selection gathers names from host\r\n2. Names are validated, some are invalid\r\n3. Feedback plug-ins call upon host libraries to perform an interactive selection of invalid names.\r\n\r\nIn this way, Validators can remain software-agnostic whilst still providing the user with software-specific feedback.\r\n\r\n# Implementation\r\n\r\nFeedback plug-ins is responsible for providing a user with interactive feedback; such as selecting an invalid asset or parts of an asset, such as vertices, pixels or channels.\r\n\r\nThey would run *after* `Validator` and *only* during validation failure.\r\n\r\n```python\r\nimport pyblish.api\r\nimport maya.cmds\r\n\r\nclass FeedbackNamingConvention(pyblish.api.Feedback):\r\n    hosts = [\"maya\"]\r\n    families = [\"asset\"]\r\n    order = 4\r\n    def process_instance(self, instance):\r\n        cmds.select(instance)\r\n```"},"comment":{"url":"https://api.github.com/repos/abstractfactory/pyblish/issues/comments/73424330","html_url":"https://github.com/abstractfactory/pyblish/issues/142#issuecomment-73424330","issue_url":"https://api.github.com/repos/abstractfactory/pyblish/issues/142","id":73424330,"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},"created_at":"2015-02-08T18:36:22Z","updated_at":"2015-02-08T18:36:22Z","body":"> I can see how one could have multiple Validators setting instance data to \"invalid mesh\" and then a single Feedbacker select all invalid meshes that came from all Validators.\r\n\r\nSounds good to me. :)\r\n"}}