[Bf-python] headers and getIpo()/setIpo()

Willian Padovani Germano wgermano at ig.com.br
Wed Jun 25 05:51:37 CEST 2003


Hi,

As you may have noticed, I'm doing a test with a new header file,
bpy_types.h.  It is for public Blender Type declarations, needed by
other modules (like BPy_Camera needed by Scene.c, etc).  Currently only
Camera and Lamp types are there.

This will free the module headers to can contain static declarations. 
One strong reason for doing that is Doxygen, since Ton and Casey agreed
that only header files will have doxygen comments and so we need them
now.

The final form of this is still open.  We could move the info in
bpy_types.h to modules.h, though that would make it much bigger and,
though well structured, not as easy to read as it is now.  Or take the
Create, Check and FromPyObject functions from there and put in
bpy_types.h), leaving even less in modules.h.  Or keep things as they
are now in both files, of course.

For the internal types, like constant, rgbTuple, vector, matrix, Bone,
etc., we could use bpy_types.h for their public declarations or another
header only for the internal ones.  Like with modules, they'd still have
header files for static declarations and doxygen comments.

Guignot: we'll need Ipo in Object.c, for obj.getIpo() and obj.setIpo(). 
This can be done with the public declarations in the Ipo files being 
moved to bpy_types.h, just like done with cam and lamp.

get/setIpo can be found in the 2.25 doc, inside the shadow module,
hasIpo object class.  Ipos are present in Camera, Lamp, Object, etc. so
they used the shadow "base" module to implement it.  Not sure if 2.25
actually had it implemented -- and to what extent, but it's a necessary
addition.

Since Guignot already wrote the Ipo module, getIpo can be done simply by
wrapping Ipo_CreatePyObject() and setIpo with Ipo_CheckPyObject() and
Ipo_FromPyObject(), setting the ipo pointer in the Blender struct to the
one from Ipo_FromPyObject().

Of course this doesn't need to be done this week, but it doesn't seem
like a lot of work.  If you guys are busy, just tell me and I'll pass
the BPy_Ipo declaration to bpy_types.h and add the get/setIpo()
functions to Object.c

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list