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

    Can you get a list of missing plugins?

    Cinema 4D SDK
    python
    2
    3
    781
    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.
    • K
      kalugin
      last edited by

      Hi, is there a way to access this list via python?
      87484e4a-05d1-4742-9a86-8755549eccfb-image.png

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

        Hello @kalugin,

        Thank you for reaching out to us. Although this might seem a bit pedantic to point out, the question 'Can you get a list of missing plugins?' is incomplete or does not make sense. Cinema 4D informs you in the dialog you show us about the node plugins referenced in a scene which are not matched by an installed plugin. Cinema 4D itself does not keep track of which plugins should be present in an instance or not. So, when the user (unintentionally) uninstalls a tool plugin, an importer/exporter, or anything else, there is no way of knowing other than collecting the necessary metadata yourself. But when a scene references node types that a Cinema 4D instance does not know, you could emulate the information shown in the dialog in Python by doing this:

        • Abstractly iterate over the whole scene and check the ID of each node with C4DAtom.GetType.
        • Check if you can find a symbol in the c4d module that represents that ID (and also looks like a symbol, i.e., something like Ocube).
        • Check via c4d.plugins.FindPlugin if a plugin does exist for that ID.
        • When both tests fail, you have found a scene element which is neither a native node nor a plugin node.

        This thread discussed the similar topic of detecting all plugin nodes in a document and I highlighted there some techniques which would also apply to your case.

        Your case is however considerably harder, as you do not want to find nodes which reference existing plugins but the nodes which reference non-existing plugins. Which forces you then to also check the c4d module for symbols as a means of evaluating if something is a native node or not (and therefore is not a missing plugin although not being indexable via c4d.plugins.FindPlugin).

        Overall, I would classify this as possible, but very much an expert subject. There is no magic function you can call, and you must do a lot of leg work yourself.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • K
          kalugin
          last edited by

          Thanks for the fast response @ferdinand . Sorry that the title of my question is somewhat misleading. The thread that you've linked is actually quite detailed and useful I'll take a closer look into that.

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