How to change the factory defaults for a button in the tool shelf?


I wanted to change the factory defaults from box select to tweak. I experiment a lot with UI code. And it is cumbersome to change box select in all layouts and modes back to tweak again and again. But i am not really successful here. As a end user i can save the state of the tool shelf by saving the startup.blend just fine. But i cannot get the factory defaults changed. The most obvious method, to save a startup.blend and to compile with it then, doesn’t work.

I had a look in the file, and toyed around with the order here. Nothing. I tried to change the tool_fallback_id in this file. Also no success. There is nothing obvious in the versioning_defaults.c file. There is also nothing obvious in the userdef_default.c to find. And also Grep did not lead to anything useful.

So how do i change the factory default state in the tool shelf? Where is the state defined? What is the trick here?

Kind regards

It’s defined in toolsystem_default_tool in wm_toolsystem.c.

Many thanks brecht :slight_smile: