[Bf-python] NMesh and edges informations

Yann Vernier yann at algonet.se
Sat Jan 15 06:42:10 CET 2005


On Sat, Jan 15, 2005 at 12:45:59AM +0000, Stephane SOPPERA wrote:
> If the modification is not done, then the current bypass to not lose the 
> edges data if they exist when linking mesh data to an object is to do:
> mesh=obj1.getData()
> obj2.link(mesh)
> mesh.update(0,1);
> This code update the mesh twice, even if the caller don't want it to be 
> updated at all. The first update loses edges data, the second one 
> recreates them. Moreover obj.link() becomes illogical since it does not 
> works the same for meshes as for other object types.

Why should the implicit update (which I don't think should be necessary,
all this copying back and forth is often unnecessary and could be finer
granularity if needed) not do the same as your update(0,1)? The default
behaviour should be to keep all data intact, with optimizations which
affect behaviour being optional and explicitly requested. 

I am also not fond of the use of 1/0 for booleans. Checking the
trueness of arguments should be enough. In this case, keyword arguments
would also be helpful - update(foo,0) is not too clear, but
update(edges=False) is more so. 

I hope I don't seem too demanding. I try to contribute a bit of code
occasionally too, but I am rather unreliable. 



More information about the Bf-python mailing list