Possible regression: Warning messages during startup about missing properties in keymap assignments #114321

Closed
opened 2023-10-31 12:31:23 +01:00 by Ingo Clemens · 4 comments

System Information
Operating system: macOS-13.5.2-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Max 1.2

Blender Version
Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-30 23:38, hash: b27ff093caa0
Worked: 3.6.1 (possible latest 3.6.x but not tested)

Short description of error
When a custom keymap file contains entries which have been added by add-ons the current release gives a warning for each during startup.
This could look like this:

Warning: property 'with_menu' not found in item 'OperatorProperties'
Warning: property 'run_in_geometry_nodes' not found in item 'OperatorProperties'
Warning: property 'option' not found in item 'OperatorProperties'

These properties are related to the Node Wrangler add-on.
All warnings occur multiple times. The number of repeats is the same and probably related to re-saving the existing keymap file after making some keymap adjustments. The assumption is, that when an add-on gets registered and adds its keymaps these are added even though they already might exist. If the user then saved the keymaps to a file he saves the data already doubled up.
I tried to replicate this behaviour but without success. Nevertheless, something like this must have happened in the past when carrying the keymaps file from one version of Blender to the next.

Check the attached keymap file and search for 'node.nw_merge_nodes' for example.

If all reported occurrences are removed from the file Blender doesn't report any warnings anymore.
This behaviour is new in the current 4.0 beta release.

This also leads to another question: Why does Blender add duplicate keymaps in the first place? The aforementioned Node Wrangler keymaps are occurring multiple times, you can even search for the entire data entry.
Shouldn't be Blender so smart to check if a keymap already exists with the exact properties before adding it? Because, if it exists there's no need to add another entry.
(This should probably be a separate bug report)

Exact steps for others to reproduce the error

  1. Select the attached keymap file in the preferences.
  2. Restart Blender and check the console output.
**System Information** Operating system: macOS-13.5.2-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 Max 1.2 **Blender Version** Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-30 23:38, hash: `b27ff093caa0` Worked: 3.6.1 (possible latest 3.6.x but not tested) **Short description of error** When a custom keymap file contains entries which have been added by add-ons the current release gives a warning for each during startup. This could look like this: ``` Warning: property 'with_menu' not found in item 'OperatorProperties' Warning: property 'run_in_geometry_nodes' not found in item 'OperatorProperties' Warning: property 'option' not found in item 'OperatorProperties' ``` These properties are related to the Node Wrangler add-on. All warnings occur multiple times. The number of repeats is the same and probably related to re-saving the existing keymap file after making some keymap adjustments. The assumption is, that when an add-on gets registered and adds its keymaps these are added even though they already might exist. If the user then saved the keymaps to a file he saves the data already doubled up. I tried to replicate this behaviour but without success. Nevertheless, something like this must have happened in the past when carrying the keymaps file from one version of Blender to the next. Check the attached keymap file and search for 'node.nw_merge_nodes' for example. If all reported occurrences are removed from the file Blender doesn't report any warnings anymore. This behaviour is new in the current 4.0 beta release. This also leads to another question: Why does Blender add duplicate keymaps in the first place? The aforementioned Node Wrangler keymaps are occurring multiple times, you can even search for the entire data entry. Shouldn't be Blender so smart to check if a keymap already exists with the exact properties before adding it? Because, if it exists there's no need to add another entry. (This should probably be a separate bug report) **Exact steps for others to reproduce the error** 1. Select the attached keymap file in the preferences. 2. Restart Blender and check the console output.
Ingo Clemens added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-10-31 12:31:24 +01:00

Warnings are not considered bugs. They inform the user that there is something wrong with their configuration. Different versions of the Node Wranger addon can cause this issue.

By the way, it doesn't seem ideal to save the Node Wrangler add-on keyitems. If I'm not mistaken they are added when enabling the addon. If the user already has these keyitems saved, could they create these duplicates?

Whatever the case, this seems to be an issue with the "Node Wrangler" add-on, so it should have been reported in the blender-addons repository instead of the blender repository.

Perhaps the addon should check if the keyitems already exists in the user's custom keymap before adding new ones.

@braverabbit, could you please use the following link to report the issue? https://projects.blender.org/blender/blender-addons/issues/new/choose

Also, make sure you find the steps to generate this weird customKeymap.py.

Warnings are not considered bugs. They inform the user that there is something wrong with their configuration. Different versions of the Node Wranger addon can cause this issue. By the way, it doesn't seem ideal to save the Node Wrangler add-on keyitems. If I'm not mistaken they are added when enabling the addon. If the user already has these keyitems saved, could they create these duplicates? Whatever the case, this seems to be an issue with the "Node Wrangler" add-on, so it should have been reported in the [blender-addons](https://projects.blender.org/blender/blender-addons) repository instead of the [blender](https://projects.blender.org/blender/blender) repository. Perhaps the addon should check if the keyitems already exists in the user's custom keymap before adding new ones. @braverabbit, could you please use the following link to report the issue? https://projects.blender.org/blender/blender-addons/issues/new/choose Also, make sure you find the steps to generate this weird `customKeymap.py`.
Germano Cavalcante added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-10-31 19:30:13 +01:00
Author

The main intention for the report lies within the fact that the warning report of Blender during startup is something new. The same keymap has been used in previous versions (with the same double entries) and there never has been any report or warning.
Therefore it doesn't matter what the add-on does or doesn't do, it's rather a matter of what Blender does when it reads the keymap file.

And this behaviour has changed. That's about all I wanted to report. I talked to a dev during BCON and he suggested to post this as a possible regression by the sound of it.

Therefore it would be interesting to see if something has been added as an improvement to check the keymaps while reading the file or if something has been changed which now leads to an "uncaught" warning report.

I have tried to replicate this "duplicating" behaviour but so far I haven't been successful. Even though saving the keymap with the enabled add-ons seems to be the only viable explanation.

Of course I would be happy to report the issue to the add-ons repository but it's more of a general issue. Node Wrangler has just been mentioned for the sake if simplicity but it basically affects all add-ons which come with their own keymap assignments.
All these add-ons work the same way when adding custom keymaps and there is no indication that any one of them has checks for existing assignments. Hence the thought that it maybe should be within the responsibility of the Blender core to check for doubles. Just a thought.

The main intention for the report lies within the fact that the warning report of Blender during startup is something new. The same keymap has been used in previous versions (with the same double entries) and there never has been any report or warning. Therefore it doesn't matter what the add-on does or doesn't do, it's rather a matter of what Blender does when it reads the keymap file. And this behaviour has changed. That's about all I wanted to report. I talked to a dev during BCON and he suggested to post this as a possible regression by the sound of it. Therefore it would be interesting to see if something has been added as an improvement to check the keymaps while reading the file or if something has been changed which now leads to an "uncaught" warning report. I have tried to replicate this "duplicating" behaviour but so far I haven't been successful. Even though saving the keymap with the enabled add-ons seems to be the only viable explanation. Of course I would be happy to report the issue to the add-ons repository but it's more of a general issue. Node Wrangler has just been mentioned for the sake if simplicity but it basically affects all add-ons which come with their own keymap assignments. All these add-ons work the same way when adding custom keymaps and there is no indication that any one of them has checks for existing assignments. Hence the thought that it maybe should be within the responsibility of the Blender core to check for doubles. Just a thought.

warning report of Blender during startup is something new.

This is not something new.
This is actually quite old (maybe before version 2.5).
If you import a keymap that sets a non-existing property to an operator, the same message appears in, for example, Blender 2.73.

Apparently, the properties 'with_menu', 'run_in_geometry_nodes' and 'option' previously existed for the "OperatorProperties" of the "Node Wrangler" add-on. They no longer appear to exist in the new version of the add-on.

The problem is that you have these hotkeys included in customKeymap.py.

I recommend deleting all hotkeys from "Node Wrangler". And export the keymap again.

> warning report of Blender during startup is something new. This is not something new. This is actually quite old (maybe before version 2.5). If you import a keymap that sets a non-existing property to an operator, the same message appears in, for example, Blender 2.73. Apparently, the properties 'with_menu', 'run_in_geometry_nodes' and 'option' previously existed for the "OperatorProperties" of the "Node Wrangler" add-on. They no longer appear to exist in the new version of the add-on. The problem is that you have these hotkeys included in `customKeymap.py`. I recommend deleting all hotkeys from "Node Wrangler". And export the keymap again.
Author

Yes, this seems to make sense. Thanks for looking into it.
I already cleaned up the file manually but wanted to report.
Thanks for your time.

Yes, this seems to make sense. Thanks for looking into it. I already cleaned up the file manually but wanted to report. Thanks for your time.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2023-10-31 21:32:02 +01:00
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
2 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#114321
No description provided.