[Verse-dev] Bitmap layer ids

Marcus Hoffmann verse-dev@blender.org
Mon, 16 Aug 2004 10:55:49 +0200


Eskil wrote:

> if you call thees two commands:
>
> verse_send_g_layer_create(node_id, 2, "my_layer", VN_G_LAYER_VERTEX_XYZ,
> 0, 0);
> verse_send_g_layer_create(node_id, 2, "others_layer",
> VN_G_LAYER_VERTEX_XYZ, 0, 0);
>
> This is fully legal to do, and it means you want to create a layer and
> then rename it. If the user actually wanted to create two layers he or
> she used the api in the wrong way. I would argue that in this case Verse
> knows very well what it is doing because it is likely only to send the
> later call in order to optimize the network usage since it knows that
> the first will be over written by the second.

This is hell for the server....
How will i know the users intention?? What if he wants to create two
layers???
And the next thing: if you (the client) send a create command, its my (the
servers) task to find a new id for it and send it back to the user. If your
idea is to do the renaming (or maybe other changes too) with a create
command, i have to search the hole id lists EVERY TIME to look if the
client-sent ID is already existing or not!
And another thing: What if a second user that is creating offline a geometry
using first his internal client IDs. Then he starts to upload the hole
scene. And he has one or more layers with his internal IDs that correspond
to IDs on the server.......
What I'm going to do now (in my current version of the server) is to ignore
his IDs and give him new ones that are unique in my verse world. If I would
look for existing IDs if a create command arrives this would end up in
overwriting another geomtry!!
So this is really a thing that has to be discussed i think!

M