Editors change bug in built in menu's #67164

Closed
opened 2019-07-18 13:01:40 +02:00 by slowk1d · 18 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia GeForce GTX 965M

Blender Version
2.80, release candidate 1, blender2.8, 18-07-2019

Short description of error
When trying to select Preferences or Timeline editor with the 3D viewport Pie Menus add-on (Ctrl-Alt-S), the editors don't appear, an error message is displayed, and the data-block menus Scene and View Layer in the top bar disappear.

Exact steps for others to reproduce the error
Based on the default startup: go to Preferences>Add-ons>Pie Menus; enable "3D Viewport Pie Menus" add-on; enable "Editor Switch Pie: Hotkey: Ctrl Alt S"; in any editor, press Ctrl Alt S and select Preferences or Timeline.

user preferences.jpg

timeline.jpg

Screenshot_1.jpg

**System Information** Operating system: Windows 10 Graphics card: Nvidia GeForce GTX 965M **Blender Version** 2.80, release candidate 1, blender2.8, 18-07-2019 **Short description of error** When trying to select Preferences or Timeline editor with the 3D viewport Pie Menus add-on (Ctrl-Alt-S), the editors don't appear, an error message is displayed, and the data-block menus Scene and View Layer in the top bar disappear. **Exact steps for others to reproduce the error** Based on the default startup: go to Preferences>Add-ons>Pie Menus; enable "3D Viewport Pie Menus" add-on; enable "Editor Switch Pie: Hotkey: Ctrl Alt S"; in any editor, press Ctrl Alt S and select Preferences or Timeline. ![user preferences.jpg](https://archive.blender.org/developer/F7616254/user_preferences.jpg) ![timeline.jpg](https://archive.blender.org/developer/F7616256/timeline.jpg) ![Screenshot_1.jpg](https://archive.blender.org/developer/F7628290/Screenshot_1.jpg)
Author

Added subscriber: @slowk1d

Added subscriber: @slowk1d
Member

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

hi this seems to be a bug in Blender. I'm getting

bpy.context.area.ui_type = '<UNKNOWN ENUM>
```'
 from the Info editor window when changing to the timeline or preferences the built in editor menu's.

hi this seems to be a bug in Blender. I'm getting ``` bpy.context.area.ui_type = '<UNKNOWN ENUM> ```' from the Info editor window when changing to the timeline or preferences the built in editor menu's.
Brendon Murphy changed title from Preferences AND Timeline editors Bug in 3D viewport Pie Menus add-on to Editors change bug in 3D viewport and Pie Menus add-on 2019-07-22 16:58:56 +02:00
Brendon Murphy changed title from Editors change bug in 3D viewport and Pie Menus add-on to Editors change bug in built in menu's and Pie Menus add-on 2019-07-22 17:00:43 +02:00

Added subscriber: @brecht

Added subscriber: @brecht

USER_PREFERENCES -> PREFERENCES renaming should be done in the add-on though.

`USER_PREFERENCES` -> `PREFERENCES` renaming should be done in the add-on though.
Member

Hi, I'm finding more editor types misbehaving.
To reproduce, user the info editor to read results and another window to test. Changing the editor types reports with several editors:

Traceback (most recent call last):
  File "C:\Users\Dell\Downloads\blender-2.80-22_07_19-win64\2.80\scripts\addons\space_view3d_pie_menus\pie_editor_switch_menu.py", line 111, in execute
    context.area.type = self.types
TypeError: bpy_struct: item.attr = val: enum "USER_PREFERENCES" not found in (, 'VIEW_3D', 'IMAGE_EDITOR', 'NODE_EDITOR', 'SEQUENCE_EDITOR', 'CLIP_EDITOR', 'DOPESHEET_EDITOR', 'GRAPH_EDITOR', 'NLA_EDITOR', 'TEXT_EDITOR', 'CONSOLE', 'INFO', 'OUTLINER', 'PROPERTIES', 'FILE_BROWSER', 'PREFERENCES')

location: <unknown location>:-1
Hi, I'm finding more editor types misbehaving. To reproduce, user the info editor to read results and another window to test. Changing the editor types reports with several editors: ``` Traceback (most recent call last): File "C:\Users\Dell\Downloads\blender-2.80-22_07_19-win64\2.80\scripts\addons\space_view3d_pie_menus\pie_editor_switch_menu.py", line 111, in execute context.area.type = self.types TypeError: bpy_struct: item.attr = val: enum "USER_PREFERENCES" not found in (, 'VIEW_3D', 'IMAGE_EDITOR', 'NODE_EDITOR', 'SEQUENCE_EDITOR', 'CLIP_EDITOR', 'DOPESHEET_EDITOR', 'GRAPH_EDITOR', 'NLA_EDITOR', 'TEXT_EDITOR', 'CONSOLE', 'INFO', 'OUTLINER', 'PROPERTIES', 'FILE_BROWSER', 'PREFERENCES') location: <unknown location>:-1 ```

The <UNKNOWN ENUM> thing is a bug in Blender, but that USER_PREFERENCES error is in the add-on.

The `<UNKNOWN ENUM>` thing is a bug in Blender, but that `USER_PREFERENCES` error is in the add-on.
Member

@brecht thanks, I'll fix the addon later today.

@brecht thanks, I'll fix the addon later today.
Member

@brecht I've fixed the error with User Preferences to > Preferences. There is still an issue with the Timeline and . I've found in Blender ui if you call it twice it works sometimes, but the whole area "Editor Menu" seems buggy.

bpy.context.area.ui_type = '<UNKNOWN ENUM>'
bpy.context.area.ui_type = 'TIMELINE'

@brecht I've fixed the error with User Preferences to > Preferences. There is still an issue with the Timeline and <UNKNOWN ENUM>. I've found in Blender ui if you call it twice it works sometimes, but the whole area "Editor Menu" seems buggy. ``` bpy.context.area.ui_type = '<UNKNOWN ENUM>' bpy.context.area.ui_type = 'TIMELINE' ```
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

TIMELINE is now DOPESHEET_EDITOR with its mode set to TIMELINE. The Add-on may be better off using the Area.ui_type enum though (see https:*docs.blender.org/api/current/bpy.types.Area.html#bpy.types.Area.ui_type), which is the same enum used for generating the regular editor dropdown and includes all the editor sub-types.

`TIMELINE` is now `DOPESHEET_EDITOR` with its [mode ](https:*docs.blender.org/api/current/bpy.types.SpaceDopeSheetEditor.html#bpy.types.SpaceDopeSheetEditor.mode) set to `TIMELINE`. The Add-on may be better off using the `Area.ui_type` enum though (see https:*docs.blender.org/api/current/bpy.types.Area.html#bpy.types.Area.ui_type), which is the same enum used for generating the regular editor dropdown and includes all the editor sub-types.
Member

commented out reference to the timeline in pie menu addon. beb30514b441 leaving open if blender devs wish to follow up.

commented out reference to the timeline in pie menu addon. beb30514b441 leaving open if blender devs wish to follow up.
Brendon Murphy changed title from Editors change bug in built in menu's and Pie Menus add-on to Editors change bug in built in menu's 2019-07-23 14:29:58 +02:00
Member

hi, there's issues here with the timelne. It's still a stand alone editor type in start up.
there's no reference to the timeline in the graph editor as the docs suggest.
bpy.context.area.ui_type = ''is bugging the Built In editor menus.
bpy.context.area.ui_type = 'TIMELINE' is still in the menu and will switch to the timeline, often on second attempt.
TIMELINE could be added back as an Editor type to prevent this error.

hi, there's issues here with the timelne. It's still a stand alone editor type in start up. there's no reference to the timeline in the graph editor as the docs suggest. bpy.context.area.ui_type = '<UNKNOWN ENUM>'is bugging the Built In editor menus. bpy.context.area.ui_type = 'TIMELINE' is still in the menu and will switch to the timeline, often on second attempt. TIMELINE could be added back as an Editor type to prevent this error.
Member

In #67164#731961, @BrendonMurphy wrote:
hi, there's issues here with the timelne. It's still a stand alone editor type in start up.

Versioning is a bit difficult for this. Can't avoid some tradeoffs.

there's no reference to the timeline in the graph editor as the docs suggest.

You mean in the UI and in the Dopesheet? The timeline is not exposed as a mode of the dopesheet in the UI. See [SpaceDopeSheetEditor.mode ]] vs. [ https:*docs.blender.org/api/current/bpy.types.SpaceDopeSheetEditor.html#bpy.types.SpaceDopeSheetEditor.ui_mode | SpaceDopeSheetEditor.ui_mode .

bpy.context.area.ui_type = ''is bugging the Built In editor menus.

As @brecht pointed out, this is a bug in Blender. Submitted fix, D5325.

bpy.context.area.ui_type = 'TIMELINE' is still in the menu and will switch to the timeline, often on second attempt.

It is in Area.ui_type, however this Add-on uses Area.type with types not available there - which is the breaking issue.

TIMELINE could be added back as an Editor type to prevent this error.

Like I explained in blender.chat, this can not be done (I assume you mean re-enabling it in the [Area.type ]] enum?). The enum is only for real editor types, and must not contain the sub-types. Internal code will become broken otherwise. Where these are needed, [https:*docs.blender.org/api/current/bpy.types.Area.html#bpy.types.Area.ui_type | Area.ui_type should be used.

> In #67164#731961, @BrendonMurphy wrote: > hi, there's issues here with the timelne. It's still a stand alone editor type in start up. Versioning is a bit difficult for this. Can't avoid some tradeoffs. > there's no reference to the timeline in the graph editor as the docs suggest. You mean in the UI and in the Dopesheet? The timeline is not exposed as a mode of the dopesheet in the UI. See [`SpaceDopeSheetEditor.mode` ]] vs. [[ https:*docs.blender.org/api/current/bpy.types.SpaceDopeSheetEditor.html#bpy.types.SpaceDopeSheetEditor.ui_mode | `SpaceDopeSheetEditor.ui_mode` ](https:*docs.blender.org/api/current/bpy.types.SpaceDopeSheetEditor.html#bpy.types.SpaceDopeSheetEditor.mode). > bpy.context.area.ui_type = '<UNKNOWN ENUM>'is bugging the Built In editor menus. As @brecht pointed out, this is a bug in Blender. Submitted fix, [D5325](https://archive.blender.org/developer/D5325). > bpy.context.area.ui_type = 'TIMELINE' is still in the menu and will switch to the timeline, often on second attempt. It is in `Area.ui_type`, however this Add-on uses `Area.type` with types not available there - which is the breaking issue. > TIMELINE could be added back as an Editor type to prevent this error. Like I explained in blender.chat, this can not be done (I assume you mean re-enabling it in the [`Area.type` ]] enum?). The enum is only for real editor types, and **must not** contain the sub-types. Internal code will become broken otherwise. Where these are needed, [[https:*docs.blender.org/api/current/bpy.types.Area.html#bpy.types.Area.ui_type | `Area.ui_type`](https:*docs.blender.org/api/current/bpy.types.Area.html#bpy.types.Area.type) should be used.
Author

Hi guys, thanks for the quick answers and taking care of this, hope it will be fixed soon.
I updated the description because I just noticed that when the error messages are displayed, the Scene and View layer data-block menus in the topbar disappear, with no possibility to bring them back unless restarting Blender (on the right side there's an arrow like the ones that appear when you collapse for example the tools sidebar, but it's impossible to click and/or drag). I added a new picture showing the result. I'm pretty new to the Blender community, I thought this update should have had to remain in this same bug notification, or do you suggest to create a new task by itself only for this?

Thanks for your time!

Hi guys, thanks for the quick answers and taking care of this, hope it will be fixed soon. I updated the description because I just noticed that when the error messages are displayed, the Scene and View layer data-block menus in the topbar disappear, with no possibility to bring them back unless restarting Blender (on the right side there's an arrow like the ones that appear when you collapse for example the tools sidebar, but it's impossible to click and/or drag). I added a new picture showing the result. I'm pretty new to the Blender community, I thought this update should have had to remain in this same bug notification, or do you suggest to create a new task by itself only for this? Thanks for your time!
Member

The UNKNOWN ENUM print should be fixed with b7f86ff722.
I guess this report can be closed. Although I'd still suggest to use Area.ui_type rather than Area.type for this add-on.

@slowk1d this kind of stuff happens when a Python script fails. The Python UI definition simply aborts in case of failure, meaning the UI will be missing remaining items.

The `UNKNOWN ENUM` print should be fixed with b7f86ff722. I guess this report can be closed. Although I'd still suggest to use `Area.ui_type` rather than `Area.type` for this add-on. @slowk1d this kind of stuff happens when a Python script fails. The Python UI definition simply aborts in case of failure, meaning the UI will be missing remaining items.
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Brendon Murphy self-assigned this 2019-08-15 00:22:21 +02:00
Member

closing as resolved, addon is fixed, ui is fixed.

closing as resolved, addon is fixed, ui is fixed.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#67164
No description provided.