[Verse-dev] Bitmap layer ids
Emil Brink
verse-dev@blender.org
Thu, 12 Aug 2004 22:55:29 +0200
On Thu, 12 Aug 2004 22:37:53 +0300
Eskil Steenberg <eskil@obsession.se> wrote:
> hi
>
> > Perhaps Eskil has some ideas?
>
> No, not realy. I ususaly think of if as if your id is valide untill
> the host gives you back the real id. I dont know if this helps.
It's certainly a way to look at it. The problem is that then you have
to pick multiple IDs that are not in use, and that is (in *theory*)
not very simple. You don't want to actually consult your local data-
base copy for a simple thing like this...
> even tinyer detail:
>
> Using the ids like 0, 1, 2 my give you issiues too. imagine the you
> send two comands with the ids 0, and 1, but they arive at the order
> 1, and then 0. then the server will first create the first layer,
> and give it the id of 0. Then the second command will arive and and
> it will modefy an existing layer (layer 0) not create a new one.
True. Ouch.
> So do as emil says use -1, -2, -3
Heh. Or ~0, ~1, and so on, since I prefer not using what looks like
negative numbers in an unsigned "context". It confuses my simple
mind.
> (i guess we are back in the invalid discussion here....)
Yes, this is what I meant when I suggested, in my initial mail about
invalid IDs, that it would be lovely if the event compression code
could be made aware of invalid IDs, and *not* consider two commands
to the same, invalid, address to be identical. That would solve the
problem for the client-side, it seems?
/Emil