[Bf-python] semantic of the get function

Willian Padovani Germano wgermano at ig.com.br
Thu Jun 12 06:49:52 CEST 2003


[I'm using this msg also to comment about today exppython updates]

On Wed, 2003-06-11 at 14:16, Jacques Guignot wrote: 

About the .Get() module functions, which return a list of names but
should (according to bpython in Blender 2.25 - 2.27) return the objects
themselves. 

> Does everybody agree with this modification?
We're trying to keep a high degree of compatibility, so it must be
done.  Besides, it's better anyway to return the objects.

Well, actually it's almost completely done, already...

> Willian, do you want to update all the files, or do u prefer I update 
> Ipo, Mball, Curve and Effect?

No need to, that was simple.  I've already done it, including yours 3,
Jordi's Armature and Bone and the ones I wrote.  I also include the 3
functions (CreatePyObject, CheckPyObject and FromPyObject) to Metaball
and Ipo, since I needed the Create... one.

I only didn't update Michel's, since I'm trying not to mess too much
more with Object.c.  He may have a more recent copy with himself and
integrating all changes is bothersome.

But, as I said I would, I fixed the Object.getData() method for some
objs.  I also updated the compare functions of the Armature and Bone
modules, as you had done yourself in that patch, Jordi.

I also made some other small changes to fix compilation problems (yours
Ipo PyType declaration and an extern for Image type in NMesh) and best
of all:

I added more types to Blender.Types (had to make all PyType definitions
non-static to do that) and checked.  Then I found that both rgbTuple and
vector were crashing Blender.  That was because of that same problem,
that Some_Type.ob_type = &PyType_Type thing.  Since both rgbTuple and
vector are only initialized when used, their ob_type was still NULL when
I tried to print Blender.Types.vector, for example.

-> Now the good news: once this was fixed, that nasty SIGSEGV crash I
reported recently also went away!  My script stopped where it should,
complaining about no Mesh module.  Great : ).  I was worried about that
one.

Well, many small changes, but it compiles fine here.  Any problem,
please report.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list