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

    How to use external libraries inside of a plugin

    Cinema 4D SDK
    python
    2
    4
    707
    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.
    • G
      GillesKontrol
      last edited by GillesKontrol

      Hello!

      I've been writing a plugin that takes some information in the form of API requests (with the third party library "Requests") but I was doing my testing inside of the Python Script Manager. It works fine this way - but when I try and do the same inside a CommandData plugin it says it can't find the "Requests" library when C4D gets loaded.

      I've tried looking for this topic but I can't seem to find an anwser to it - apologies if this is a stupid question or if I just didn't look in the right place for it, as it seems something pretty basic but I can't get it to work 😄

      Any help would be much appreciated!

      Thanks

      1 Reply Last reply Reply Quote 0
      • G
        GillesKontrol
        last edited by

        Nevermind, i'm an idiot. All I had to do was place the lib in a folder in the plugin. Solved! 😄

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

          Hello @GillesKontrol,

          thank you for reaching out to us. I am glad that you found your solution. When you are seeking an overview of the subject for future reference, I would recommend the Python Libraries manual in our documentation. It lines out the many ways in which dependencies can be exposed for a script or plugin.

          Cheers,
          Ferdinand

          MAXON SDK Specialist
          developers.maxon.net

          1 Reply Last reply Reply Quote 1
          • G
            GillesKontrol
            last edited by

            Thankyou! Noted!

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