[Bf-python] Hashing Vectors
Campbell Barton
cbarton at metavr.com
Tue Jul 18 13:01:09 CEST 2006
Martin Poirier wrote:
> --- Campbell Barton <cbarton at metavr.com> wrote:
>
>
>> Hi, There are a few scripts I have that I use a dict
>> for vertex
>> locations, so as not to double up on locations as an
>> example
>>
>> vert_dict[tuple(vertex.co)]= vertex.index
>>
>> It would be nicer and faster if the 2,3, or 4
>> floats could be hashed,
>> any hints as to hashing a vector and possibly a
>> matrix type?
>>
>
> Mutables objects can't be used for keys.
>
> Standard python rule.
>
> Martin
What about just hashing at the current location. of course if the
vectors location is changed then it wont apply.
mesh's vert's edges are faces are all hash'able should this not be the case?
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
More information about the Bf-python
mailing list