[Bf-python] Python functions to call internal boolean operations
Joe Eagar
joeedh at gmail.com
Fri Feb 17 08:26:33 CET 2006
Frédéric COIFFIER wrote:
> This patch defines 3 functions to the Object API :
>
> > difference(Object)
> > union(Object)
> > intersection(Object)
>
> Thanks to these functions, I can write :
>
> > newobject = sphere1.difference(box2)
>
> This patch was made against blender 2.41 source code.
> Currently, the code doesn't check if the Object is a mesh. (As I'm really a
> beginner with blender and the blender code, maybe this patch is dirty.)
>
> The patch can be found here :
> http://projects.blender.org/tracker/index.php?func=detail&aid=3928&group_id=9&atid=127
>
checking an object type is as simple as checking the ->type field, for
example 'if (ob->type==OB_MESH)" where ob is a Blender Object struct
(not one of the bpy api ones).
you can find definitions of all this is
source/blender/makesdna/DNA_object_types.h
joeedh
More information about the Bf-python
mailing list