[Bf-python] Small omitted functions

Stephen Swaney sswaney at swbell.net
Sun Sep 19 16:29:38 CEST 2004


Campbell Barton wrote:
> 
> This is the world.makeActive() function- Needs to be added to World.c in
> the Python Dir, its quite simple, as for mist- This can be toggled with
> the mode- setMode and getMode
> 
> Its just not documented yet.
> 
> - Cam
> 
> /* world.makeActive */
> static PyObject *World_makeActive (BPy_World *self)
> {
>     World *world = self->world;
>     /*If there is a world then it now has one less user*/
>     if(!G.scene->world) G.scene->world->id.us--;
>     world->id.us++;
>     G.scene->world = world;
>     Py_INCREF(Py_None);
>     return Py_None;
> }

"Where is the rest of it?", he said with a grin.
hint: a patch would be even nicer.

Naming Conventions

While we are at it, this might be a good time for
some discussion of naming.  We seem to be jumping
back and forth in the bpy code between
setActive
setCurrent
makeActive
makeCurrent

It would be nice to have some sort of convention for this.
Makes life simpler for the user when things all work the
same way.  Blender's view manipulation commands are an
example of this.

Personally, I have no preference between {make | set } and
{Active | Current }.  Some consistency would be good, however.
-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list