Page MenuHome

Contradictory labels in UI. Naming of boolean properties sometimes positive, sometimes negative.
Confirmed, LowPublicDESIGN


System Information
Operating system: Any
Graphics card: Any

Blender Version
Blender 2.80.74 aka rc2

Short description of error
Inconsistency in naming leads to contradictory info.

Exact steps for others to reproduce the error

  • Open Blender
  • Select an object on the scene (add one if you have nothing...)
  • Go to Object properties panel
  • Scroll down to Visibility
  • Hover "Show in Renders"
  • A pop-up info label reads "Globally disable in renders", so now you're not sure what happens if you check the box
  • Check the box
  • Open the Info Editor, the last line will read "bpy.context.object.hide_render = True"

So now we have three different nomenclatures for the same thing. Two that are contradictory within the UI and one that is the opposite naming of what's in the UI.

Instead of having properties named "show_name" and some others "hide_viewport", all such boolean properties could be named "show_function" or "enable_function" so that you don't have to negate the negation as in hide_viewport = False

Since Blender 2.8 is a breaking release, it is the time when you can implement coherent naming. After that, it's going to be much more difficult.

Of course that's by far not a priority since it doesn't break Blender.

Related Objects

Event Timeline

Jacques Lucke (JacquesLucke) lowered the priority of this task from 90 to Low.Aug 7 2019, 2:08 PM

The RNA name is not that important here, but I see the issue with the description saying the opposite than what the checkbox does.
This is because the code for that property is col.prop(ob, "hide_render", text="Show in Renders", toggle=False, invert_checkbox=True). See the invert_checkbox in the end. However, the tooltip is not inverted.

Confirming as low priority. Maybe @William Reynish (billreynish) has an opinion on this, but this issue is just not that important....

We should try and never use double negatives.

Therefore we should not have negative booleans such as 'Dont do X'

@William Reynish (billreynish) Exactly my point. I will let you lobby from within so that developers keep that mind. ;)
"hide_render" and "hide_viewport" are 2.8 properties so even as we speak, core devs are not aligned on this usability view. The next stage is probably "unhide_render" followed by "dont_unhide_render". Joking.

I wouldn't have talked about this if I didn't see some effort in UI/UX for 2.8. Keep up the good work on Blender!

What you see here, is that the UI layer has inverted the checkbox so it isn't a double negative, which is good.

But in the code it's confusing because it's essentially a tripple-negative.

This is a bit of an awkward situation. We can't just change the RNA definition, because that would be an API breaking change. I'd expect that many add-ons and scripts use these properties. One thing we could do is making the tooltip text more general, so that it doesn't describe a specific enabled/disabled state. But I personally find it hard to come up with a good description that follows our usual tooltip language, am open for proposals though :)

Another thing we can do is wrapping the RNA properties with (runtime-only?) properties. E.g. we can do this in Python:

1diff --git a/release/scripts/startup/bl_ui/ b/release/scripts/startup/bl_ui/
2index bb020084b03..17e4c67a671 100644
3--- a/release/scripts/startup/bl_ui/
4+++ b/release/scripts/startup/bl_ui/
5@@ -23,6 +23,7 @@ from bl_ui.properties_animviz import (
6 )
7 import bpy
8 from bpy.types import Panel, Menu
9+from bpy.props import BoolProperty
10 from rna_prop_ui import PropertyPanel
13@@ -371,6 +372,27 @@ class OBJECT_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
15 self.draw_settings(context, avs, mpath)
17+bpy.types.Object.is_visible_viewport = BoolProperty(
18+ name="Show in Viewports",
19+ description="Enable object to be visible in the viewport",
20+ set=lambda object, value: setattr(object, "hide_viewport", not value),
21+ get=lambda object: not object.hide_viewport,
22+ options={'SKIP_SAVE'},
23+ )
24+bpy.types.Object.is_visible_render = BoolProperty(
25+ name="Show in Renders",
26+ description="Enable object to be visible in a render",
27+ set=lambda object, value: setattr(object, "hide_render", not value),
28+ get=lambda object: not object.hide_render,
29+ options={'SKIP_SAVE'},
30+ )
31+bpy.types.Object.is_selectable = BoolProperty(
32+ name="Selectable",
33+ description="Enable object to be considered on selection operations",
34+ set=lambda object, value: setattr(object, "hide_select", not value),
35+ get=lambda object: not object.hide_select,
36+ options={'SKIP_SAVE'},
37+ )
39 class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
40 bl_label = "Visibility"
41@@ -390,11 +412,11 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
42 ob = context.object
44 col = flow.column()
45- col.prop(ob, "hide_viewport", text="Show in Viewports", toggle=False, invert_checkbox=True)
46+ col.prop(ob, "is_visible_viewport", toggle=False)
47 col = flow.column()
48- col.prop(ob, "hide_render", text="Show in Renders", toggle=False, invert_checkbox=True)
49+ col.prop(ob, "is_visible_render", toggle=False)
50 col = flow.column()
51- col.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True)
52+ col.prop(ob, "is_selectable", toggle=False)
55 class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
(The properties shouldn't use the is_ prefix, ignore that.)

Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Design".Thu, Feb 13, 7:57 PM