[Bf-committers] space.c refactor questions
Ton Roosendaal
ton at blender.org
Mon Mar 21 11:54:20 CET 2005
Hi,
I've discussed the issue with Tom on IRC briefly. Since I'm still the
owner/maintainer of this piece in Blender, I'd prefer to act very
careful and cautious here. Minor cleanups in the code can seem nice,
but if it doesn't lead to actual new development and substantial
improvements we better postpone it. Cleanup just for the sake of it is
dangerous. However, for smaller patches Tom can always contact me
(mail, irc) and I'll help review & approve.
Nevertheless, the whole event system in general can use an overhaul,
which is another *huge* project, better not to start before someone
feels 100% familiar with the code. This then could also result in
splitting up the blender/src/ directory, into a clear & well designed
structure.
-Ton-
On 18 Mar, 2005, at 21:16, Tom M wrote:
> I'm refactoring space.c and have some questions on how people would
> like things organized
>
> each of the major spaces has most of the following four functions
>
> extern void init_FOOspace(ScrArea *sa);
> extern void drawFOOpace(ScrArea *sa, void *spacedata);
> extern void winqreadFOOspace(ScrArea *sa, void *spacedata, BWinEvent
> *evt);
> extern void changeFOOspace(ScrArea *sa, void *spacedata);
>
> and an associated function
>
> SpaceType *spaceFOO_get_type(void)
>
> there are also a large number of miscelanous functions
>
> the init and change are fairly small functions - the winqread is
> usually huge, as is the draw functions.
>
> My thoughts are - split the drawFOOspace into a drawFOO.c since this
> is how many are already handled. Then move init, winqread, and change
> into space_winqreadFOO.c
>
> split out the miscelaneous functions to where they go, or into
> space_helpers.c and leave the remaining functions that are space
> releated in space.c
>
> Does this sound like a reasonable organization?
>
> I'm already fairly much done, but I can change things if needed.
>
> LetterRip
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton at blender.org
http://www.blender.org
More information about the Bf-committers
mailing list