Equivalent of GetMulP ?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/03/2011 at 23:39, xxxxxxxx wrote:

    Hi,

    I just finished re-reading the COFFEE introduction to Matrices and Vectors.
    It was a nice read, but I noticed, comparing it to the equal Python Docs chapter ("Matrix fundamentals") that the last part about Vectors and Points was missing from the Python docs.

    In that part the essential GetMulP COFFEE function is introduced and since I couldn't find that function in the Python SDK I would like to ask what the equivalence is in Python.

    Can we just write M * P if M is a matrix and P is a point?

    Thanks for reading!

    Andre

    PS: There's a typo in the Python version of the Matrix fundamentals:

    If Mg is a matrix in global space and Mag is object a's global matrix, then Mag-1*Mg equals the first matrix' in a's local coordinates
    

    I believe it should be

    If Mg is a matrix in global space and Mag is object a's global matrix, then Mag^-1*Mg equals the first matrix' in a's local coordinates
    


  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/03/2011 at 07:39, xxxxxxxx wrote:

    Hello
    Is in example plugin(Python doc\examples\plugins\) Py-SpherifyModifier?

      
    pcnt = mesh.GetPointCount()  
    pm = mesh.GetMg()  
    padr = mesh.GetAllPoints()  
    for i, point in enumerate(padr) : p = pm*point  
    


  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/03/2011 at 11:14, xxxxxxxx wrote:

    Ok, so you can multiply a global matrix with a point.

    Thanks a lot for replying and thus pointing me into the right direction.

    EDIT: Hm, still not working the way I expect it to.... oh well.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/03/2011 at 08:37, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Ok, so you can multiply a global matrix with a point.

    Thanks a lot for replying and thus pointing me into the right direction.

    EDIT: Hm, still not working the way I expect it to.... oh well.

    I'm tring too.
    I try to get size of obj, but one of value is Null(base cube with default settings). with it:

      
        
        
        pm = op.GetMg()  
        padr = op.GetAllPoints()  
        for i, point in enumerate(padr) : p = 2(pm*point) - pm.off
    

    Also tried to convert several coffee-based classes from Per-Anders Edwards's wiki pages(with preserving of copyrights). But there was no success.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/03/2011 at 11:21, xxxxxxxx wrote:

    Well, I did manage in the end to get it working what I was trying to achieve.
    I posted the source for my function that involved this question as well in this forum post here:

    https://plugincafe.maxon.net/topic/5610/5639_how-to-rotate-just-the-axis

    Maybe it can help you...

    Cheers,

    Andre



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/03/2011 at 12:38, xxxxxxxx wrote:

    Andre, thanks a'lot for tip-code
    I found solution(i need careful to read py4c4d doc). It's BaseObject.GetRad(). I tried to code deformer plugin.


Log in to reply