5
$\begingroup$

For lack of a less drastic alternative, I created a whole module just for setting bpy.context.window.screen to a specific screen, since bpy.ops.screen.screen_set is relative.

I originally named the module's operator class SCREEN_OT_set_screen and operator screen.set_screen, played with setting the shortcuts both in the user preferences menu and in code, then changed the name to SCREEN_OT_set and the operator screen.set.

Despite wiping any references to it in User Preferences->Input and double-checking by looping through all items of all keymaps of all keyconfigs, I still get this twice on Blender startup:

search for unknown operator 'SCREEN_OT_set_screen', 'SCREEN_OT_set_screen'
search for unknown operator 'SCREEN_OT_set_screen', 'SCREEN_OT_set_screen'

I make sure to set the shortcut key after registering the operator class, and it persists when I rename the module class back to the SCREEN_OT_set_screen that it's looking for, or even remove the file from scripts/addons entirely.

Where in Blender's start-up process is it likely still looking for this and failing?

$\endgroup$
0
$\begingroup$

Search for "SCREEN_OT_set_screen" (literally, a text search) in your startup files. On Windows they're located in C:\Users\[USERNAME]\AppData\Roaming\Blender Foundation\Blender\2.79\config\. The files are "userpref.blend" and "startup.blend", you can open them with a text editor.

First, backup these files to somewhere safe.

Delete all the text starting from and including the first "DATA" word right before the first occurrence of your operator name, until the next "DATA" word after the last occurrence, but don't delete this last "DATA" word as it's the start of a neighbor entry.
Then save and try opening Blender. Save your user preferences and startup file from within Blender, just to make sure.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.