[Bf-committers] Proposal: Split up Outliner code
Ton Roosendaal
ton at blender.org
Sun Jul 10 18:58:49 CEST 2011
Hi Joshua,
I also had this in mind many times... never had the time for it.
If you don't mind, here's a slight alternative split suggestion:
outliner_tree.c - building outliner structure
outliner_draw.c - could get buttons now too, code is too mixed up
outliner_edit.c - same as you propose
outliner_tools.c - might be better name as '_menu' :)
Thanks!
-Ton-
------------------------------------------------------------------------
Ton Roosendaal Blender Foundation ton at blender.org www.blender.org
Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands
On 6 Jul, 2011, at 16:36, Brecht Van Lommel wrote:
> I agree this can be split up, proposed files seem fine.
>
> Brecht.
>
> On Wed, Jul 6, 2011 at 4:05 PM, Joshua Leung <aligorith at gmail.com>
> wrote:
>> 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
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
More information about the Bf-committers
mailing list