-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VisualiserTool : Vertex Labels #6212
VisualiserTool : Vertex Labels #6212
Conversation
97f6cf9
to
d853320
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Eric - this seems to be working nicely. I've made a few comments about the implementation inline - feel free to ping me when you get in if it's easier to chat about them in person.
Cheers...
John
"preset:Color (Type Range)", GafferSceneUI.VisualiserTool.Mode.ColorTypeRange, | ||
"preset:Color (Manual Range)", GafferSceneUI.VisualiserTool.Mode.ColorManualRange, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you're trying to convey the underlying mechanism in the name here, but I do wonder if maybe "Type Range" is a bit unobvious? I think maybe "Auto Range" conveys more quickly that the range will be picked for you, and then the tooltip can tell you the details of how.
Maybe just "Color" and "Color (Auto Range)" for the names?
I'm bikeshedding here, and others may disagree, so feel free to canvas other opinions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we put "Color (Auto Range)" after "Color" please? To me it is a variant of the first, so makes sense to come second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, yes, fixed in a97c8f1
70f87c9
to
398f9a3
Compare
I think I have the comments addressed except for the drag-value-shared-data part. Hold off just a bit on reviewing the fixups so I can take a fresh look on Monday and we can talk through the data handling part then too. |
072a654
to
33621af
Compare
All the comment should be addressed now, including an improvement to the data handling that uses With that noted, ready for a new look... |
Imath::V2f cursorPos() const; | ||
bool cursorPosValid() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked a little at getting rid of the separate m_cursorPosValid variable and just rely on the state of m_cursorPos, but I think they are logically different enough that they are both needed.
Can you explain? My comment was based on the assumption that the two variables had combined semantics that were equivalent to optional
. When do we use m_cursorPos
while m_cursorPosValid == false
, and why?
"preset:Color (Type Range)", GafferSceneUI.VisualiserTool.Mode.ColorTypeRange, | ||
"preset:Color (Manual Range)", GafferSceneUI.VisualiserTool.Mode.ColorManualRange, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we put "Color (Auto Range)" after "Color" please? To me it is a variant of the first, so makes sense to come second.
Thanks Eric, I think we're close now! Sorry, I somehow submitted my inline comments without a covering letter, so am making one last comment here. I wonder if it is possible to make Auto mode even smarter when rendering a points primitive? Currently, float, point and color data just isn't visualised at all in this mode, so could we show it as vertex labels, like we do for ints? Soon we'll be able to default to lines for vector and normal data, but I think labels will always be the best we can do for the other types? |
b5a929e
to
e078806
Compare
I crossed off the comments above, and added some better handling of Points and Curves in 269d03e. I also found we were getting possibly misleading drag and drop data in some cases. For example, we're not visualising data with I think it's worth not dragging those values and letting it instead drag the scene path. I prevented against that in e078806. One last thing to do is a pass at the node documentation to make sure it's correct through all the permutations the code goes through here. But the rest is ready for another review. |
One small suggestion here : don't list of all the permutations of decisions that "Auto" mode makes. Just document it as "Chooses the most appropriate mode based on the data and primitive type". The permutations are only going to get more complex when we add vector and orientation modes, and the point of Auto is that folks don't have to think.
LGTM! Thanks for the fixups and for the additional extras you caught. Could you squash all this down and merge away please, after checking over the docs. Note that we've released 1.5.4.0 already, so the Changes.md stuff will need moving. |
This is in preparation for visualising vertex indices. By namespacing primitive variable names, we can ensure there are no collisions between special data names (for things like vertex indices) and primitive variable names.
Timing the previous `stringstream` implementation vs `fmt::format` shows about a 70% speedup for formatting a sample mesh's vertex indices.
e078806
to
a404dfd
Compare
Wonderful! I squashed it down and simplified the documentation as you recommended. That's much improved now. The changelog entries are in the right place as well. Merging! |
Woopwoop! 🎉 |
This adds a new method for visualising object data, a vertex label per-vertex.
It uses this new method for vertex indices and integer primitive variables when in
Auto
mode, leaving the other data types to be displayed as colors. And there's a dedicatedVertex Label
mode to see other data types as a label as well. There are some additions that could be made, such as visualising string variables, but I've drawn the line for the PR at the types we support.This also includes the change from #6190, which I'll close.
Checklist