[Bf-committers] Increasing groupe name size

Ed Halley ed at halley.cc
Thu Jan 26 14:26:25 CET 2006



bmx007 wrote:
> Hello,
> i'm working on a script who applies vertex name group as "mathematic" 
> formula on vertex of this group.
> 
> The actual limitation of group name size of 32 is too low for my needs.
> I will increase this size to 80 (or 64 , 256 ...) characters

I have only taken a quick peek, but I expect the size limit on vertex 
group names is the same size limit for the names of ALL object types. 
Everything "inherits" from the ID type, including the name field.  (For 
vertex groups, it's hard-coded in several other spots.)

I would personally like to see a longer name possible, but changing the 
length of an array in the serializable data structure system (SDNA) is 
problematic, and I expect there are many parts of the code which make an 
assumption on the length because it's such an old part of the code.

Making naive group names like "vg(3.0x^2+2.0y+1.0*z=0)" will of course 
run out of room pretty quickly.  You need to find a way to replace those 
derived names with something more compact, if not meaningful to humans.

I expect you're not going to make n^32 different vertex groups.  Your 
set of vertex groups is probably pretty sparse, even if you decided to 
make thousands of groups.  I would recommend a Dictionary system, where 
you allocate new names and refer them to your real data structure which 
has the mathematical construct for that vertex group.

Can you get away with Base64-encoding your group names?  If you stick to 
ASCII digits, that's *only* 10^32 groups possible.  If you stick to 
Base64 encoding, that's now 10^57 possible names.  There are only 10^79 
estimated atoms in the known universe.  I'm fairly sure you could 
normalize any useful mathematical group number to that range?

-- 
[ e d @ h a l l e y . c c ]


More information about the Bf-committers mailing list