<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C44CA2.846793D0">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;
        mso-font-charset:2;
        mso-generic-font-family:auto;
        mso-font-pitch:variable;
        mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:553679495 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>

<div class=Section1>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>It’s a good point. The reason for
adding these to the mathutils module itself was because they are not ‘internal’
vector methods. These methods act on another object and so I just stuffed them
in the main module. What I mean is that the internal methods for the class
Vector, for instance, all act on itself. CopyVec() acts on another object. Because
vector, quaternion, euler and matrix are used elsewhere in the API – for instance
in object.getMatrix() – I thought we should keep anything not internal (meaning
self-acting) to the vector class, in the main Mathutils module. <span
style='mso-spacerun:yes'> </span>However, if it’s a pain in the @$$,
we could move them into the classes themselves, this was simply a design
decision on my part. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>MatMultVec and VecMultMat is a little more
complex because I wanted to keep pre- and post- vector/matrix mutliplication
explicitly separate. Answer = vec.multMat(x) doesn’t say wether you want pre-
or –post multiplication (although it does imply it </span></font><font
color=navy face=Wingdings><span style='font-family:Wingdings;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";color:navy;
mso-char-type:symbol;mso-symbol-font-family:Wingdings'><span style='mso-char-type:
symbol;mso-symbol-font-family:Wingdings'>J</span></span></font><font
color=navy><span style='color:navy'> ) I thought that MatMultVec(mat, vec)
would be more clear than mat.multVec(vec) but again this was sort of the way
this was built. Maybe mat.preMultVec() and mat.postMultVec() would be clear
too. Of course the easiest way to do this would be answer = mat * vec (which is
allowable). <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Ive learned a bit since this module was
written and there are some more clean up that needs to be done here (especially
the argument parsing doh). Is there a set of functions that you think should be
class internal? –maybe the whole thing.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>I agree the examples are really the meat
for these new methods and if they are sparse it’s hard to understand how
to use them. As stiv once pointed out writing good documentation takes time and
effort. A better documentation with examples would be helpful Im sure.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Willian and michel know more about the old
blender python and the current python set up than I do, but for my part I don’t
mind the C API </span></font><font color=navy face=Wingdings><span
style='font-family:Wingdings;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:navy;mso-char-type:symbol;
mso-symbol-font-family:Wingdings'><span style='mso-char-type:symbol;mso-symbol-font-family:
Wingdings'>J</span></span></font><font color=navy><span style='color:navy'>. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> bf-python-admin@blender.org
[mailto:bf-python-admin@blender.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>blake e<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, June 07, 2004 1:46
PM<br>
<b><span style='font-weight:bold'>To:</span></b> bf-python@blender.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Bf-python] New here
but...</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I would still like to ask
some questions.  I have been encouraged to take a look at the blender
python docs, and perhaps edit/change/add-to them.  I don't know if this
effort is welcomed or not, but at least I'll get to learn a bit about how the
Python/C API works.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>My question is:  Should the
Mathutils methods be where they are, or should they be methods of their
respective classes?  What I mean is from a python point of view it makes
more since for the CopyVec function to be a method of the Vector class. 
It would also allow you to drop the Vec leaving you with <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>vec_new = my_vector.copy()<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I don't know if this makes sense for
methods which take two arguments though.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>vec_new = my_vector.Cross(vec_fu)<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> seems a little odd.  The
mixed type operations aren't so bad though <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>vec_new = my_vector.MatMul(matrix)<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I know how easy this would be to
change in python, just copy the method into the appropriate class, and replace
vec with self...  Looking at the code though it seems like it is much more
difficult to do in C.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>On a side note as I understand it
Bpython used to be partly coded in Python?  Can I ask why this changed (or
for a link to the relevant information)?  It seems to me from the outside
that it would be much more useful if the Bpython modules were actually in
written in Python.  I just did a short test and it seems I cannot inherit
from Blender classes.  I can think of other reasons why it would be nice
to have a ~/.blender/python dir, but I will wait to hear the reasons against
Bpython before I make myself look more foolish.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Back to what I am supposed to be
doing, would it be helpful to have examples at the class, or method level
instead of just at the module level?  When I'm using the API reference I
look at the documentation to know what is available, but I look at the examples
to know how things work.  Does anyone else think this would be useful?<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Lol, I've seen posts like this on
other forums/newsgroups, and they always seem to go horribly wrong for the
person who posted them.  The people who have worked so many hard hours
creating their software seem to get very PO’d when someone comes in out
of nowhere and starts saying how they think it should be done.<span
style='mso-spacerun:yes'>  </span>Hopefully my willingness to actually do
the things I’m proposing will help take some of the edge off your anger,
but I am bracing myself none the less.<o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>