Page MenuHome

Cleanup: Remove some label redefinitions in mirror UI
AbandonedPublic

Authored by David Swift (rococo) on Dec 13 2020, 10:40 PM.

Diff Detail

Repository
rB Blender
Branch
mod-mirror-ui-tidy (branched from master)
Build Status
Buildable 11724
Build 11724: arc lint + arc unit

Event Timeline

David Swift (rococo) requested review of this revision.Dec 13 2020, 10:40 PM
David Swift (rococo) created this revision.
David Swift (rococo) retitled this revision from Remove some label redefinitions in mirror UI to Cleanup: Remove some label redefinitions in mirror UI.Dec 13 2020, 10:53 PM
Hans Goudey (HooglyBoogly) requested changes to this revision.Dec 14 2020, 12:11 AM

For groups of properties like mirror U and mirror V, the way it's written now is purposeful ,to avoid repetition of the word "mirror", which looks ugly and is redundant. So this isn't a cleanup but a change to the UI.

The label text should only be replaced with NULL when the text is exactly the same as the property definition.

This revision now requires changes to proceed.Dec 14 2020, 12:11 AM

This was intended to address a comment from @Bastien Montagne (mont29) on https://developer.blender.org/D8445:

Better avoid re-defining another label here, unless it is absolutely necessary (rest of this existing code could use some cleanup in that regard btw).

For groups of properties like mirror U and mirror V, the way it's written now is purposeful ,to avoid repetition of the word "mirror", which looks ugly and is redundant. So this isn't a cleanup but a change to the UI.

Understood--is this is a general design principle that's being followed in the UI?

I honestly thought the inconsistency was confusing.

The label text should only be replaced with NULL when the text is exactly the same as the property definition.

Since these property definitions appear to only used in this UI would it be appropriate to change the description on those? Or are the property descriptions also used implicitly elsewhere?

Yes, this is a principle used commonly in the UI. Often the UI labels for buttons in panels don't have to provide quite as much context as the full property name because of things like neighboring buttons, headings, panel / sub-panel titles, etc. However, the actual property names should make sense in a flat list.
Some examples:

etc.

Checkbox buttons also give some context in that they imply a "use" before the property name. So while the property name should have a full "Use" in front of it in many cases to make it clear that it's a boolean property, the UI label doesn't necessarily need one.
There are still plenty of places where there is redundant text defined, those should be cleaned up. The one you've found here is for use_mirror_udim.

Changes like this should be tested too. For example, the following change just removes a label from the UI:
row = uiLayoutRowWithHeading(col, true, NULL);

Appreciate the clarity.

Changes like this should be tested too. For example, the following change just removes a label from the UI:
row = uiLayoutRowWithHeading(col, true, NULL);

I wish I had a good excuse ready for that one. Will resubmit after slimming this change down and making sure the change works.

Submitted the one-line change as https://developer.blender.org/D9847. This diff can be retired.