[Verse-dev] Numerical IDs [R4]

Emil Brink verse-dev@blender.org
Mon, 9 Aug 2004 16:59:02 +0200 (MEST)


Eskil,

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.

It would provide an obvious, simple, and fairly natural way to check
if e.g. an ID has been set by the server or if the client is still
waiting for it, and not use any extra space.

Sure, it would mean that the effective number of layers (or method
groups, or methods) would be reduced by one, but I really can't see
that as a real practical problem.

It could also perhaps be possible to include "knowledge" of this in
the event compression code, so that code like this:

	verse_send_o_method_group_create(node, 0, "foo");
	verse_send_o_method_group_create(node, 0, "bar");

could work. Today, the event compressor will consider these two calls
to refer to the same ID (zero), and replace the former with the
latter in many cases.

/Emil