[Bf-committers] Naming rules
Ton Roosendaal
bf-committers@blender.org
Fri, 27 Jun 2003 17:41:56 +0200
Hi,
'Library' and 'Object' are about the first structs I've added in
Blender... :)
They're used with that name in Blender's file system (DNA), which
doesn't easily allow name changes for structures.
Later on, for such names we've agreed on adding a lower case 'b', to
indicate it's a Blender struct. So there's a bAction, bArmature, etc.
For now it works for the supported OS's... better not put energy in
changing that... there's no end in what you can change! And the code
won't run better too.
> for public name:
> <component>_xxxx ex: BLI_exit()
This has been accepted. A lot of old code was adapted to it, new code
should apply to it.
> for local or static name:
> <prefix>_<component>_xxx
>
> where prefix may be:
> p pointer
> k constant
> l locale to a component
> s static
> v variable
> f function
> e enumeration
> s structure
> u union
> no prefix loop indice (i,j,k,...)
This convention is very personal, and you'll hardly notice it in
Blender code.
In the old NaN intranet docs is a code style guide. Maybe time to
undust that, and post it at a more visible location!
-Ton-
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton@blender.org
http://www.blender.org