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

    Mac M1 bug?

    Cinema 4D SDK
    r25 python
    4
    8
    1.1k
    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.
    • P
      pim
      last edited by

      Our python plugin does not seem to work on the new M1 Mac's with the new hardware chip in it. The plugin works on all other Mac's (and pc's) without any issues.

      Our user reported this issue on a MacBook M1 Pro Max using the latest version of C4D.
      Our support team confirmed the same issue when using Mac M1 and MacBook M1.
      Apparently one of the libraries is not functioning correctly.

      The plugin TGS Texture Manager is initialized, but when creating icons, we get below error.
      What can we do to solve this?

      Here the output from the console, which does not give me much information.

      TGS Texture Manager 1.9.0 initialized.
      Python Version is sys.version_info(major=3, minor=9, micro=1, releaselevel='final', serial=0)
      DazToC4D : has successfully loaded
      DaztoC4D : Exports to /Users/ss-h/Documents/DAZ 3D/Bridges/Daz To Cinema 4D/Exports.
      Initialized renderBeamer: Beam it up.
      Initialized renderBeamer: Cost calculator.
      DropandRender Initialized.
      HDRI Studio Rig V(2.153) - for R23+
      Traceback (most recent call last):
        File "GePython", line 7, in <module>
      AttributeError:module 'urllib' has no attribute 'urlretrieve'
      Threading started
      nrFolders:86
      TGS Texture Manager took:0.020990848541259766 to run
      Traceback (most recent call last):
        File "/Applications/Maxon Cinema 4D R25/plugins/TGS Texture Manager/TGS Texture Manager V1.9.0.pypv", line 3364, in CoreMessage
      ValueError:PyCapsule_GetPointer called with incorrect name
      Traceback (most recent call last):
        File "/Applications/Maxon Cinema 4D R25/plugins/TGS Texture Manager/TGS Texture Manager V1.9.0.pypv", line 3364, in CoreMessage
      ValueError:PyCapsule_GetPointer called with incorrect name
      Traceback (most recent call last):
        File "/Applications/Maxon Cinema 4D R25/plugins/TGS Texture Manager/TGS Texture Manager V1.9.0.pypv", line 3364, in CoreMessage
      
      1 Reply Last reply Reply Quote 0
      • P
        pim
        last edited by

        I found a workaround given by Maxon.
        https://support.maxon.net/hc/en-us/articles/4419835016466-Cinema-4D-R25-current-known-limitations-on-M1-Mac

        'Currently, you can run Cinema 4D in the Rosetta mode on M1 systems, to use it.'

        1 Reply Last reply Reply Quote 0
        • a_blockA
          a_block
          last edited by

          Looking at the first error message, I wonder, if this is just a Python 3 issue, where urlretrieve seems to be located in urllib.request module? On the other hand maybe that error is completely unrelated...

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by

            Hi beside the urlretrieve error highlighted by Andreas, the second one is an issue related how you deal with CoreMessage, you need to adapt your code to Python 3, see this topic.

            But so far I don't see any M1 related error in your logs.
            If you still have an error, please share your code, if you don't want to make it public you can send it to us at [email protected].

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • P
              pim
              last edited by

              We have this error only on Mac M1 machines. Not on PC or none M1 mac's.
              We also changed the code earlier, but I will double check.
              And yes, I do thinkg that the first error message is urlretrieve not related to this issue.

              1 Reply Last reply Reply Quote 0
              • P
                pim
                last edited by

                I changed the code from

                                pythonapi.PyCapsule_GetPointer.restype = c_void_p  
                to
                                pythonapi.PyCapsule_GetPointer.restype = c_int
                
                here the 'full' code
                
                                P1MSG_UN = msg.GetVoid(c4d.BFM_CORE_PAR1)
                                pythonapi.PyCapsule_GetPointer.restype = c_int           # c_void_p            
                                pythonapi.PyCapsule_GetPointer.argtypes = [py_object]
                                P1MSG_EN = pythonapi.PyCapsule_GetPointer(P1MSG_UN, None)
                

                There is no difference, still not working.
                On other Mac's and PC's it is working.

                What to do?

                1 Reply Last reply Reply Quote 0
                • M
                  m_adam
                  last edited by

                  Hi @pim please try to provide us a minimal code to reproduce the issue otherwise we can't really do more to investigate the issue.

                  if you don't want to make it public you can send it to us at [email protected].

                  Thanks in advance,
                  Cheers,
                  Maxime.

                  MAXON SDK Specialist

                  Development Blog, MAXON Registered Developer

                  1 Reply Last reply Reply Quote 0
                  • ferdinandF
                    ferdinand
                    last edited by

                    Hello @pim,

                    without any further questions and other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022.

                    Thank you for your understanding,
                    Ferdinand

                    MAXON SDK Specialist
                    developers.maxon.net

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