Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    MODATA_SIZE always None???

    PYTHON Development
    0
    7
    848
    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
      Helper
      last edited by

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

      On 19/04/2012 at 09:50, xxxxxxxx wrote:

      In a Mograph Phython Effector I want to read the size of the individual clones in order to adjust the position to line them up without gaps.

      I tried to get the size with GetArray(c4d.MODATA_SIZE) but always get None back. MODATA_MATRIX, MODATA_COLOR, etc works pretty well, just SIZE appears to be broken.

      Is this actually an error or do I make something wrong?

      Cheers,
      Gerhard

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

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

        On 20/04/2012 at 07:54, xxxxxxxx wrote:

        Doesn't appear to be working

        anyone else care to check

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

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

          On 20/04/2012 at 12:08, xxxxxxxx wrote:

          yeah, it seems to be broken (suprise , suprise :D), used a script tag to eliminate possible
          effectpor bugs. however you can read the matrix, so you have access to the size in this way.

          import c4d
          from c4d import documents, modules
          from c4d.modules import mograph as m
          #Welcome to the world of Python
            
            
          def main() :
              md = m.GeGetMoData(doc.GetActiveObject() )
              print md.GetArray(c4d.MODATA_MATRIX)
          
          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

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

            On 21/04/2012 at 08:10, xxxxxxxx wrote:

            Hi,

            this is not broken. MOGRAPH_SIZE is used only by the MoGraph Matrix object. Use MODATA_MATRIX instead and you have all information you need.

            Cheers, Sebastian

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

              On 16/05/2013 at 13:22, xxxxxxxx wrote:

              Hi Sebastian, can you please explain how to get the size of the clone from the MODATA_MATRIX?
              do you have to normalize the vectors?

              Thanks!

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

                On 16/05/2013 at 13:29, xxxxxxxx wrote:

                it is just like for any other matrix in c4d

                v0 (sx, 0, 0)
                v1 ( 0,sy, 0)

                v2 ( 0, 0,sz)

                sx,sy,sz is the size vector.

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

                  On 16/05/2013 at 13:34, xxxxxxxx wrote:

                  haha you're helping me all over the place. 
                  Thanks again Little Devil!👏

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