Page MenuHome

Show_gizmo throws errors if executed outside of the 3D View
Closed, ArchivedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: Intel(R) UHD Graphics 600 Intel 4.5.0 - Build 26.20.100.7262

Blender Version
Broken: version: 2.83 (sub 2), branch: master (modified), commit date: 2020-01-30 16:18, hash: rBfd959bf658c3
Worked: (optional)

Short description of error
The ability to switch the gizmos on/off is only working in the 3D View, everywhere else it'll throw an error, even though there are gizmos in that region.

Exact steps for others to reproduce the error
Note the short cut key for toggle show_gizmo:


Execute the operator in any other region/area that 3D View.
Gif(3d view, sequencer preview, render):

The ability to switch off the gizmos is much needed ex. when doing multicam:

The error:

Error: Traceback (most recent call last):
  File "C:\Users\user\Documents\build_windows_x64_vc16_Release\bin\Release\2.83\scripts\startup\bl_operators\wm.py", line 349, in execute
    if context_path_validate(base, data_path) is Ellipsis:
  File "C:\Users\user\Documents\build_windows_x64_vc16_Release\bin\Release\2.83\scripts\startup\bl_operators\wm.py", line 84, in context_path_validate
    value = eval("context.%s" % data_path) if data_path else Ellipsis
  File "<string>", line 1, in <module>
AttributeError: 'SpaceSequenceEditor' object has no attribute 'show_gizmo'

@William Reynish (billreynish) suggested that I should report this.

Event Timeline

No, it's not a bug - I didn't say that. It's missing functionality. The ability to hide the viewport gizmos could be made to affect all editors.

Philipp Oeser (lichtwerk) reopened this task as Confirmed.Feb 5 2020, 11:47 AM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

Confirmed, checking...

No, it's not a bug - I didn't say that. It's missing functionality. The ability to hide the viewport gizmos could be made to affect all editors.

This is true for any setting in bpy.context.spacedata (object type visibility, gizmo, anything in overlay, ...)
@William Reynish (billreynish): should we not handle this more gracefully? Anyways, feel free to close again...

Philipp Oeser (lichtwerk) changed the task status from Confirmed to Needs Information from Developers.Feb 5 2020, 12:10 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Information from Developers to Confirmed.Feb 18 2020, 3:25 PM
Julian Eisel (Severin) closed this task as Archived.Feb 18 2020, 3:58 PM

As mentioned, this feature is only available in the 3D View. In other editors it's not implemented.

The error shown only shows up if you assigned a custom shortcut to the button. Since the button uses the generic wm.context_toggle operator, it is assigned on a window-manager level, not on a editor-type level. So it can be executed in other editors, but will fail. The same is true for other buttons using this generic operator (e.g. try with transform orientation).

So the reported issue itself is not a bug, but a missing implementation. We could fail better, but that is a limitation of the generic RNA toggle operator.