[Verse-dev] Numerical IDs [R4]

Eskil Steenberg verse-dev@blender.org
Mon, 09 Aug 2004 22:26:22 +0300


Hi!

As it turns out Tuesday turns out to be a day when nothing 
interesting happens at siggraph...

> how about specifying that no valid numerical ID can ever be 0 in
> Verse?  This is true for nodes, I think (for historical reasons, 
as
> far as I know), but could also be convenient for e.g. layers, 
method
> groups, and methods, and all other places where things are 
assigned
> numerical IDs.

OK, here is the reason. All node references in verse use node ids, 
while in most other references verse uses names, (layers, groups, 
buffers and so on). So only for the object links does one need to be 
able to set a link to nothing. as i think about it there are a few 
other id systems where one references to ids, namely material 
fragments and vertex ids. in these cases invalid references are 
references to non existing data. (if intentional usually set to -1 
cast to uint32 or uint16) i would probably like there to be some 
mention in the spec that this id is reserved. MAX_UINT is a very 
natural number since verse ids usually starts at 0 and grows. 
However please note that having an explicit invalid id doesnt mean 
that all other values are valid.

So if i where to make a change i would rather alow the node id zero, 
and use MAX_UINT32 as the reserved invalid node id.

It is also a smaller change for developers.

E