Light Linking Editor - #7047
Conversation
johnhaddon
left a comment
There was a problem hiding this comment.
Thanks Murray! I think this is going to be jolly handy for a lot of folks.
I've made a few comments on the code inline - hopefully they are all pretty straightforward. But I think what I want to talk about most is my own first awkward attempt at using the editor interactively. I gave myself the job of adding a couple of special lights to the eyes of the robot, and my process went like this...
- Switch to the linking editor. I can see everything there. Cool.
- Select the eyes using the Viewer. I can see the objects selected and expanded in the Objects tab. So far so good.
- What next?
- I can see the light I want, but if I select/drag it, I'll lose my visual reference in the Objects tab because the selection is gone. I also need to drag it to two different cells, but don't want to have to repeat myself.
- I could edit the
linkedLightscells directly instead, but they're not selected - the name column is. How to convert the selection to the cells I want without doing it manually?
Was I holding it wrong? This may be frustrating given our prior conversations, but I'm kindof wondering if we should allow selections on the left and the right to peacefully coexist. And then have buttons for "link selected lights to selected objects" and so on...
Cheers...
John
|
Thanks for the input! I've added some link/unlink buttons in b363c14, with some SetExpressionAlgo supporting functionality in 5c05129, and a couple of fixes I spotted along the way in f920a22 and d63a267. It'd be worth you having a bit of a play with this so we can chat about it when I'm online tomorrow, might still be worth making selections on the left and right sides coexist more peacefully. Currently selection on both sides is possible with the Ctrl-click gambit but it is a little bit inelegant, maybe there is a world where both sides' selection could just accumulate? I've left the "Append" link/unlink button modes deliberately simple for now, we could potentially attempt to avoid creating redundant edits for locations where the lights to be linked are already included via another set in the incoming set expression, but that starts venturing into mind reading territory or results in edits that may only be valid for the current context. The status bar and button tooltip wording might do with a bit of refinement, and there's still a weird visual quirk still to be tracked down tomorrow with the "mode" and "attribute" PlugValueWidget widths (if you switch the LightLinkingEditor's local Edit Target to something other than following the Global Edit Target, those widgets truncate to what looks like a width inclusive of their label width, while the original width they're created at appears exclusive of their label width. The issue goes away when these widgets have no label). |
|
Thanks for the update Murray - I've made a couple of drive by comments as I started looking at this again, but have hit home time before getting to the end. Hopefully they're somewhat useful in the meantime... |
Tracked this one down to PlugLayout inconsistently applying "width" metadata to PlugValueWidgets with labels, setting width on the PlugValueWidget when first created, but later updates set width on the parent PlugWidget. A fix and some tests added in 73acd9f. |
johnhaddon
left a comment
There was a problem hiding this comment.
Thanks Murray - the buttons definitely feel like what folks will be wanting from this, and I think the way you've presented it as just two buttons and mode/target makes a lot of sense - better than lots of hard-to-distinguish buttons. Few minor comments inline, but I think we're very close - feel free to squash everything down as you go...
4c693de to
e51cdb2
Compare
|
Comments addressed inline, I've also pushed 68754f2 and af3396a which improve the editing behaviour a little. We now check for any warnings up-front and only edit in situations where there aren't any warnings, rather than partially editing and warning on the rest. This better matches the edit behaviour of InspectorColumn when multiple cells are selected, where we only show the PlugPopup if there are no edit warnings. |
johnhaddon
left a comment
There was a problem hiding this comment.
Thanks Murray, this is feeling much easier and more obvious to use than the first version. Couple of minor remaining things inline, but the finish line is in sight...
e51cdb2 to
dbb1eb6
Compare
Some of our editors are filtered to only present a subset of the scene (such as the LightEditor and LightLinkingEditor). When we sync selection to these editors from the entire scene, the selection may include paths not returned by `PathListingWidget.visualOrder()` for a PathListingWidget displaying a filtered scene.
`visualOrder()` provides consistency, but has the additional benefit of filtering out paths in the selection that aren't actually displayed by the PathListingWidget, such as when dragging from the lights path listing in the LightEditor or LightLinkingEditor while the selection contains more than just lights.
…ut update Previously updates applied the width to the container PlugWidget for widgets with labels, instead of the contained PlugValueWidget (as is being done when the widget is first created). So the update resulted in a truncation of the PlugValueWidget as the same width now applied to both it and its label.
dbb1eb6 to
95a2a16
Compare
|
Thanks for the updates Murray - I've squashed and merged. I made one tiny tweak at 95a2a16#diff-e7d4060cb4c776ef5f350844f5afe3bc1a28a586cb735b15f819527ae4fd436aR408, to get us back to exactly the old behaviour in the HierarchyView. |
This adds a new editor for inspecting and editing light links in a scene. It displays lights and sets containing lights in separate tabs on the left, and objects and light filters in separate tabs on the right. The lights and sets can be optionally filtered to only display those linked to or filtered by the selected objects and light filters, this occurs in the background to keep the UI responsive in heavy scenes with large selections of objects and light filters. This would be another beneficiary of a PathListingWidget with an embedded BusyWidget, once we figure out where to put one...