[Bf-committers] Change Representation and Initialisation of Matrices to Conform with Standard Notation

Campbell Barton ideasman42 at gmail.com
Fri Dec 9 10:28:30 CET 2011


On Fri, Dec 9, 2011 at 7:10 PM, bartius crouch <bartius.crouch at gmail.com> wrote:
> Hello Andrew,
>
> Even though this change might be for the better, it has the potential
> to break existing scripts. There already was a change in the
> vector/matrix multiplication order some months ago, and the result was
> that a lot of users complained about broken scripts.
> I have to admit that I might be missing some of the finer points in
> this discussion, and I imagine that I might not be the only one. I
> think it would be benificial that if this patch is accepted that some
> documentation is provided with some practical before/after examples.
>
> Kind regards,
> Bart

While breaking scripts is a pain, I also want to have mathutils
working correctly - Since I'm not math expert I'll have to go by what
others say is expected/correct and I still miss feedback from math
gurus in this thread.

On the script side I think we can survive this well. I had a quick
look into scripts using item item access for matrix values.

Including contrib a quick naive grep of [][] access shows a bit over
100 lines, the same for matrix multiplication shows over 200
- point being many scripts use mathutils.Matrix but don't access
individual values.
Even '100' lines is a bit misleading since quite a few of these lines
are apart of larger blocks where a matrix is accessed.

see: http://pastie.org/2990143


My sense is that this wont be that hard to go over scripts and swap
matrix[a][b] for matrix[b][a], in some cases its not so simple but we
can always transpose.


More information about the Bf-committers mailing list