From BlenderWiki

Jump to: navigation, search

[edit] Event Refactor Unofficial Information Page

[edit] Introduction

This page is written to provide basic info on what the event refactor is, and what it means to the average Blender dev. It's in no way an "official" design document; its purpose is to inform new developers what parts of Blender they cannot touch until after the event refactor.

The event system in blender is really, really messy. It has been for years; the system is entirely non-configurable and 100% hardcoded. Refactoring it has been on the ToDo for years, but it was only until recently that several higher-priority projects were completed, and the refactor could finally be given the place of Next Big Refactor.

[edit] Ramifications

The important effect of the imminent event refactor, is that no one is allowed to write features that modify the event system in a major way (such as custom hotkeys, tool repeat commands, etc). Patches for this will be rejected (there's really no choice) as I and others have discovered in times past.

It should be noted, however, that features which merely *use* the event system (like new Mesh tools that add to the WKEY popup menu, or possibly new UI features, I'm not sure about that one) are allowed.

[edit] Do-Not List

Here is a list of do-nots for the event system.

  • Do not rearrange, clean up or otherwise change the structure of the event handling functions.
  • Do not write a tool-repeat feature (I believe this is planned for the refactor anyway).
  • Do not write a custom-hotkey feature.