Page MenuHome

Add node tooltips to Geometry Nodes primitives
ClosedPublic

Authored by Nikhil Shringarpurey (Nikhil.Net) on Sep 26 2021, 12:39 AM.

Details

Summary

Building on the awesome work in D12607 by @Johnny Matthews (guitargeek), this Diff adds tooltips to all of the inputs for the default primitives nodes where they make sense.

I'm doing a pass through other nodes to see where tooltips would add value, but figured this was a quick win.

Diff Detail

Repository
rB Blender

Event Timeline

Nikhil Shringarpurey (Nikhil.Net) created this revision.
Nikhil Shringarpurey (Nikhil.Net) edited the summary of this revision. (Show Details)

Thanks! I also can't think of a downside of having tooltips on every socket. We just might want to have a global variable that contains a common tooltip for e.g. geometry input/output. This would make it easier to change later on if necessary.
Will let Hans have a look at the tooltips because I'm probably still not aware of the best practices for tooltips.

Thanks! I also can't think of a downside of having tooltips on every socket. We just might want to have a global variable that contains a common tooltip for e.g. geometry input/output. This would make it easier to change later on if necessary.
Will let Hans have a look at the tooltips because I'm probably still not aware of the best practices for tooltips.

Understood - I was working on more nodes after this diff and realized perhaps a best practice would be to use the phrasing from the documentation itself. That way, if improvements are needed for clarity, it would encourage the documentation to also get updated at the same time. I can certainly do that also.

Hans Goudey (HooglyBoogly) requested changes to this revision.Sep 30 2021, 8:37 PM

As an example, I think a tooltip on the output of a primitive node that says "The output mesh" isn't worth anyone's time-- translators, developers, the space it takes in the compiled application, the line it takes in the source file, etc.
I know that is a bit arbitrary, but I still think it's a helpful guideline.

However, I think there is still room for more tooltips in these files. Things like offset, inner and outer radius, reverse, could have helpful explanations.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
30

This isn't quite right, it's the number of points in one rotation, so maybe The number of points in one rotation of the spiral

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_star.cc
30

On a curve, these are "points" rather than vertices.

This revision now requires changes to proceed.Sep 30 2021, 8:37 PM

Updates to all curve and mesh primitives to align with exact phrasing in the Blender manual. There are a couple small changes where the manual text is missing or poorly worded, and I will submit a separate patch to the manual to correct those.

Also note that the Mesh Line Node does some weird stuff with node inputs - instead of hiding/showing based on the mode set in the drop-down, it actively renames node labels. This makes adding consistent tooltips a challenge, and may indicate bad architecture compared to other GeoNodes.

Forgot to mark comments as closed. These now use the same wording as the Blender Manual.

Thanks for continuing to work on this! I left some fairly detailed comments, I think these will be a huge help though, especially when we get to more complex nodes.

I asked in the #user-interface-module chat if we generally prefer "The" at the start of descriptions for properties, since I didn't remember. I find myself preferring one or the other depending on the context.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
41–48

In "Offset" mode, this is the position relative to the control point, which is probably worth saying

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
37

I would just start a new sentence here, the phrases aren't connected enough to use a semicolon IMO.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc
37

A new sentence here too. And the curve doesn't necessarily even go through this point, are you sure that "tangent to" is correct?

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc
50–51 ↗(On Diff #43327)

Looks like we should be more careful about reusing sockets in the future! Outside the scope of this patch! I'd prefer a period here too though.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
48

Since this is a checkbox, the "boolean-ness" is implied, and doesn't need to be restated in the tooltip.
The tooltip should state what it does in the positive state, like "Switch the direction from clockwise to counterclockwise"

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_star.cc
43

The object being described is the twist value, so it should read like the others, something like "The clockwise rotation of the outer set of points" (feel free to riff on that!)

source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
41 ↗(On Diff #43327)

How about "The number of edges running vertically along the side of the cone"

50 ↗(On Diff #43327)

Generally I don't think we have to write "from the Z axis" when describing up or down. It should be known from elsewhere IMO.

source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc
36 ↗(On Diff #43327)

I'd keep this as "vertices", no need to change that.

46 ↗(On Diff #43327)

Nice job with this one :)

source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
40 ↗(On Diff #43327)

ico sphere is two words I think.

source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc
38

individual edges -> each individual edge is simpler I think.

45

Yeah, this is unfortunate, I shouldn't have reused the sockets.

Suggest "In offset mode, the distance between each socket on each axis. In end points mode, the position of the final vertex"

source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
38 ↗(On Diff #43327)

How about this, which is a bit more specific? The number of horizontal rings I think it makes "vertical" and horizontal a bit easier to tell apart if that applies there too.

43 ↗(On Diff #43327)

to -> from if I'm not mistaken

Great feedback. I'll incorporate these. Since I'm also trying to keep the Blender Manual updated in lockstep with this, I'll also start generating a child Differential to this one that focuses on updating the manual to be consistent.

Comments addressed. New diff attached.

Diff addressing all of Hans' comments. Following style guidance, I did add periods to some sentences as requested and completed the second sentence of each pair with a period also, as it just looks ugly (and is bad grammar style) to have one period-terminated sentence and another hanging there with nothing.

Diff addressing all of Hans' comments. Following style guidance, I did add periods to some sentences as requested and completed the second sentence of each pair with a period also, as it just looks ugly (and is bad grammar style) to have one period-terminated sentence and another hanging there with nothing.

The last period is added automatically by the tooltip system, so if you add it manually in the tooltip, there will be two periods.

Removed double periods - did not realize they were getting added by code elsewhere.

Updated diff to be compatible with Hans' changes in D13033.

Hans Goudey (HooglyBoogly) requested changes to this revision.Oct 29 2021, 6:41 PM

Looking close. N_ should be added to the descriptions too.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
33

I think this is the number of points, right?

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
55

Maybe The distance from each point to the origin so that this doesn't just repeat the word from the socket name.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc
37 ↗(On Diff #44119)

Sorry to say the same thing again, but I think a new sentence makes a bit more sense here.

41 ↗(On Diff #44119)

To avoid repeating the word again, maybe The distance between the first point and the last

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
38–42

I think these should clarify the difference between the radius attribute on the curve and the position-- this really affects the latter.

This revision now requires changes to proceed.Oct 29 2021, 6:41 PM
Nikhil Shringarpurey (Nikhil.Net) marked 4 inline comments as done.

Updated as per comments. 2 open questions on comments remain for clarification.

Added comments. I'll add the N_ once you're good with the changes as they stand.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
33

I think this is the number of points, right?

It is, but it's kind of a "6 of one, half dozen of the other" thing. 4 points = 4 edges. This was the phrasing in the manual, so I kept it that way, but I'll update them both to "points" for consistency.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
55

I had it that way in a previous commit, but the more I thought about it, if someone is using blender, do we really need to explain what a radius is? That term is used everywhere throughout the UI, such as when adding meshes/curves in the 3d viewport.

I'll defer to others on this one, but I think that may be overcomplicating it where we simplified in other places.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
38–42

I think these should clarify the difference between the radius attribute on the curve and the position-- this really affects the latter.

I'm not quite sure I understand your meaning here. Those values are the radii of the top and bottom of the spiral. The position is the the radius, so I am not sure what we are differentiating between. I'm possibly just being stupid here, but I don't quite catch what we would change.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
33

4 points = 4 edges

That is true for cyclic splines, but for non-cyclic splines, where there is always one more point than there are edges/segments.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
55

Actually I agree with you about all of that, but then I don't think there should be a tooltip if it's just repeating the socket name with a few more words-- it just wastes people's time.

Maybe others don't agree with me, I'm not sure.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
38–42

Well, one thing the node could theoretically do is affect the radius attribute, control it somehow to change over the length of the spline.
This isn't doing that, it's just moving the points at the end based on the radius value.
Maybe this is not actually going to confuse someone, I sort of doubt it. But I also think it's worth making the tooltips "technically correct". Sorry if I'm overthinking this.

Nikhil Shringarpurey (Nikhil.Net) marked 2 inline comments as done.
  • Added "N_" prefixes to all tooltip descriptions for easier localization.
  • Updated radius description on Circle primitive.
  • Corrected phrasing for bezier segment
  • Added description to spiral to explicitly state that we are not changing the curve's radius value
source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
55

Actually I agree with you about all of that, but then I don't think there should be a tooltip if it's just repeating the socket name with a few more words-- it just wastes people's time.

Maybe others don't agree with me, I'm not sure.

Definitely. I'm pretty torn on this one from my user experience background. Consistency would demand that all input sockets have tooltips, not just a few. It tends to look unpolished if some sockets are missing it entirely. But we also have inconsistency across Blender with how radius is defined (or not defined). Perhaps the shortest path is just to put the "distance from the origin" bit back in here for now. Perhaps a consistent definition of radius across the program is a task I could follow-up on at a later time via some right-click-select feedback.

(I think this is a separate point from the one Jacques made earlier about not needing to label output nodes with tooltips, as those are generally pretty obvious.)

  • Update to radius tooltip for Curve Spiral

@Hans Goudey (HooglyBoogly) given the UI thread comments, I think this is to good to commit as-is. The child diff for updating the manual is in sync as well.

I'll commit this with just a couple tweaks. Thanks again for the patch!

This revision is now accepted and ready to land.Nov 3 2021, 7:21 PM