Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Equivalent of GetMulP ?

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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  
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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://developers.maxon.net/forum/topic/5610/5639_how-to-rotate-just-the-axis

              Maybe it can help you...

              Cheers,

              Andre

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post