Unleash the power of 3D
#17619 Likes: 0
  • Posts 4699

Okay. The original bforartists.py keymap file is in 2.79scriptspresetskeyconfig

And here you can also place new created keymap when you don’t want to import it. But the keymap import is not the problematic part. It’s already the export where it breaks here and there.

Let’s dive a bit deeper.

As you may notice, the Blender keymap is not there. This one is hardcoded. What Blender does, and of course Bforartists too, is to store the differences to the hardcoded keymap. When you manipulate a keymap, and save the user preferences, then this differences goes into the *.blend file that stores the user preferences. So still no file to manipulate.

You have to export the keymap, which creates a text file. And that’s already the part where some key entries gets corrupted then. And needs a fix. My favourite is the hotkey for Pose mode, which gets remapped to Object mode then.

What you could do is to compare your new created keymap with the original Bforartists keymap. That way you can find the differences, and that way you can fix what is broken, and save the file then. There are tools that allows you to compare text files. Meld for example. It’s a programmer tool that i use very often. It colors you what is different. http://meldmerge.org/

I wouldn’t recommend the other way that i do. Adding the keymap items in the text file. That’s the programmer approach ^^

But in both cases you need to know how everything works. And so let’s describe how the text file is build. It’s in fact not this complicated. We have for example this entry for a hotkey:

kmi = km.keymap_items.new(‘object.parent_set’, ‘P’, ‘PRESS’, ctrl=True)

Ignore the kmi= … part. The vital part here is object.parent_set. That’s the operator, in this case parenting. P is the hotkey. PRESS means when key is pressed. ctrl=true tells us that the hotkey works togehter with ctrl. The hotkey for parenting in pose mode is there fore Ctrl+P.

That’s already it. Every entry is a single hotkey. Or at least neary. There are some special cases where you have additional properties and settings. But here you better let Bforartists create the entries, and fix them afterwards then.

I hope i haven’t confused you too much ^^