{"action":"created","issue":{"url":"https://api.github.com/repos/richardlayman/feather/issues/4","labels_url":"https://api.github.com/repos/richardlayman/feather/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/richardlayman/feather/issues/4/comments","events_url":"https://api.github.com/repos/richardlayman/feather/issues/4/events","html_url":"https://github.com/richardlayman/feather/issues/4","id":118883442,"number":4,"title":"SceneGraphEditor in QML","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/richardlayman/feather/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-25T17:13:35Z","updated_at":"2015-11-27T08:16:38Z","closed_at":null,"body":"I noticed in [the Wiki](https://github.com/richardlayman/feather/wiki/UI-Development) that you mention that the scene graph editor was written in C++ rather than QML due to performance constraints.\r\n\r\nI've been curious about implementing an editor in QML in the past and wouldn't have thought it to be too slow; do you still have the performance comparisons available? I'd be interested in giving it one more go, just so we're sure. It would be a shame to limit QML-designers from editing everything except the thing that pretty much matters the most."},"comment":{"url":"https://api.github.com/repos/richardlayman/feather/issues/comments/160065926","html_url":"https://github.com/richardlayman/feather/issues/4#issuecomment-160065926","issue_url":"https://api.github.com/repos/richardlayman/feather/issues/4","id":160065926,"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-11-27T08:16:38Z","updated_at":"2015-11-27T08:16:38Z","body":"> Speed is obviously the most important thing - the SG has a straight shot for the core in C++ but has to go through the Qt wrapper for QML\r\n\r\nAre you sure this is a performance bottleneck that you've actually tested?\r\n\r\n> Another reason is that it puts a lot of logic code into the UI\r\n\r\nI agree with this sentiment; QML should contain no business logic at all under ideal circumstances. But I'm not sure it has to come to that.\r\n\r\nThe way I'm imagining this to work, is for there to be a model, such as the QAbstractItemModel, which would contain all data and logic for handling that data; such as making or breaking connections. The UI then would merely trigger such an event, with an appropriate description of which nodes requests a connection from which attribute to which other attribute.\r\n\r\nThat way, QML contains only UI logic, such as when to start drawing an edge and how large the animated circle would be when hovering a compatible endpoint, which I think is a good, and expected, place for it.\r\n\r\n> but when you start getting into a lot of nodes with complex connections, the difference will start to compound.\r\n\r\nI can see what you mean, but I'm not sure I agree.\r\n\r\nWith an appropriate use of the loader, we could (quite easily, I think) ensure that only visible nodes are drawn and drawn at an appropriate LOD based on their size.\r\n\r\nJust like how the ListView currently handles trillions of items, but really only draws the few that are currently in view.\r\n\r\nThe reason I feel so strongly that the graph editor needs to be in QML, is because of how important the interaction and look of it is to the overall sense of Feather. Take Maya for example; most of it is regular Widgets, but it's Hypershade and Node Editor are instances of QGraphicsScene. This means you can't tweak their look and that they are bound to remain identical to users looking to customise and even to those within the company, because only those with sharp C++ skills will ever be able to modify it's look (and feel).\r\n\r\nI see Feather standing out from the crowd here (and perhaps even take the lead)."}}