[Bf-committers] Proposal: Split up Outliner code

Joshua Leung aligorith at gmail.com
Wed Jul 6 16:05:50 CEST 2011


Hi all,

Having been working on extending the Outliner code with some
additional editing functionality via the context menus (RMB) as part
of my SoC project, I've found that it's starting to be a bit of a
chore navigating around this code (on a few occasions, I've been
flip-flopping around trying to locate outliner_make_element()  for
example - for some reason, it seems to have a knack of hiding...).

Basically, currently the bulk of the code, from tree building and
drawing, through to editing and additional tools is all defined in the
outliner.c, which at last check weighed in at 157 kb. While not at
readfile.c (> 300 kb) proportions yet, I think it's getting to the
point where it would help that the various "precincts" in this file
get their own dedicated files.

I'm currently thinking of dividing it up into the following files:
* outliner_core.c - all utilities for building (outliner_add_element,
etc.), filtering (outliner_filter_tree), and free/store/openclose
stuff
* outliner_menu.c - all operators and callbacks used for handling RMB
click on items
* outliner_edit.c - all operators for toggling stuff, and/or hotkey
accessed operators. Also KeyingSet and Driver operators could go here.
* outliner_draw.c - outliner_draw(), etc. outliner_buttons() and its
callbacks may go here too, although perhaps they should be put into
their own file too (outliner_buttons.c)?

Objections? Suggestions? Comments?

Regards,
Joshua


More information about the Bf-committers mailing list