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

    Python Plugin Missing

    Cinema 4D SDK
    3
    11
    2.0k
    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.
    • ManuelM
      Manuel
      last edited by Manuel

      hello,

      it's a bit difficult without having your code,

      Could you share your code ?
      we have this email if you don't want to share it in public : [email protected]

      (I moved this topic to Cinema 4D Development categories)

      Cheers,
      Manuel

      MAXON SDK Specialist

      MAXON Registered Developer

      1 Reply Last reply Reply Quote 0
      • T
        terrachild
        last edited by terrachild

        I'll check one more thing before I send it.

        I noticed C4D R20 & R21 both use python:
        '2.7.14 (default, May 3 2018, 18:05:57) [MSC v.1500 64 bit (AMD64)]'

        While R19, where my plugin works, uses python:
        '2.7.9 (default, Apr 20 2015, 08:46:13) [MSC v.1700 64 bit (AMD64)]'

        This is probably the reason, but why?

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

          Hi,

          the Python revision is pretty much the last thing I would look into, as it seems unlikely that it is the culprit. The first thing I would check is: Does the plugin register? You talk about not showing up, which does not necessarily mean that the plugins have not been registered. The register functions (e.g. c4d.plugins.RegisterObjectPlugin) all return a boolean indicating the success of the registration. Alternatively you could look into the plugin manager.

          Cheers
          zipit

          MAXON SDK Specialist
          developers.maxon.net

          1 Reply Last reply Reply Quote 0
          • T
            terrachild
            last edited by

            I checked the plugin manager in all 3:
            R19: the plugin is in the list.
            R20: not in the list
            R21: not in the list

            If it is not in the list in R20 and R21 does that mean it didn't register?

            Thanks

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

              Hi,

              the plugin manager shows you two things.

              1. The Cinema Python plugin files (the *.pyp files) Cinema has found on start up.
              2. And as a a little fold out the plugins that have been registered from each file.

              When your file does not show up at all, this probably means it either does not have the correct extension or does not lie within the search path for plugins. Other culprits could be some weird encoding mishap (save the file again with a good editor in UTF-8 encoding) or no read access for Cinema in this path.

              Cheers
              zipit

              MAXON SDK Specialist
              developers.maxon.net

              1 Reply Last reply Reply Quote 0
              • ManuelM
                Manuel
                last edited by

                hello,

                I forgot the basic, but where did you installed you plugins ?
                Did you add the folder into the preferences for plugins directory ?

                Cheers,
                Manuel

                MAXON SDK Specialist

                MAXON Registered Developer

                T 1 Reply Last reply Reply Quote 0
                • T
                  terrachild @Manuel
                  last edited by

                  It is definitely in the correct installation location, in the user data plugins folder that C4D sets up, since I can see another working plugin in the same location show up in both the plugin manager and in the UI.

                  Again, I am simply copying the plugin folder from the R19 location to the R20 and R21 location. Nothing else is changing. It could be an encoding issue that R19 and its version of python handles, but that R20 & R21 don't. I was looking into that last night before you mentioned it. I'll keep checking that.

                  Thanks

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

                    Hi,

                    before I would chase down any weird encoding problems, I would really make sure that my pyp file is not being executed. So put something like this into your pyp file:

                    if __name__ == "__main__":
                        print "my plugin is executed as the main module"
                        print RegisterSomePlugin(*data)
                    

                    I just did some tinkering and found out that if you do not do any registration calls in a pyp file Cinema (R20) crashes. All this lets me think that Cinema actually does not see your file at all, because if the file would be executed c4d would either crash, throw an exception or load the plugin.

                    I would double check that you have both read access to the plugin pyp file path and plugin folder path, i. e. if that file/folder is not hidden and the user with which you run c4d has reading permissions.

                    Cheers
                    zipit

                    MAXON SDK Specialist
                    developers.maxon.net

                    1 Reply Last reply Reply Quote 0
                    • ManuelM
                      Manuel
                      last edited by Manuel

                      hello,

                      As i said, hard to say without your code.

                      side note :
                      you should not install your plugins in any of cinema4D's folder. (preferences or main directory)
                      But choose any directory you want on your disk and add this directory into the plugins search paths (preferences of cinema4D --> plugins section)

                      You can use the preferences folder only to store the preferences of your plugin.

                      Cheers,
                      Manuel

                      MAXON SDK Specialist

                      MAXON Registered Developer

                      1 Reply Last reply Reply Quote 0
                      • ManuelM
                        Manuel
                        last edited by

                        hello,

                        I will considered this thread as solved tomorrow if you have nothing to add.

                        Cheers,
                        Manuel

                        MAXON SDK Specialist

                        MAXON Registered Developer

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