[Bf-python] api requests

Yann Vernier yann at donkey.dyndns.org
Sat Dec 31 09:56:51 CET 2005


On Sat, Dec 31, 2005 at 04:33:50PM +1100, Jonathan Merritt wrote:
> Tom M wrote:
> >Pardon my ignorance but isn't the hash ID consistent?
> 
> It might be - I haven't tried it.  If it is, then it would help if it 
> were documented.  What I'm getting at is that it must be codified as 
> part of the API.  These things have to form part of the fundamental 
> contract.
> 
> Can anyone else comment?  Does the hash ID of a face always remain the 
> same through all frames?  Are the rules the same for NMesh and Mesh?

I'm afraid not. Blender regenerates python wrapper objects on request,
and while a python id is unique in its lifetime, it may and most likely
will be reused. Hashes aren't ever guaranteed to be unique, and most of
Blender's datatypes have no hash implementation. It's also possible
(though undesired) to get multiple wrappers for the same blender object,
which is fixable but hasn't been done. 

I'm not familiar with how you read particles from bpy, so there may be a
way to identify them which I don't know about. 



More information about the Bf-python mailing list