Can you get a list of missing plugins?
-
Hi, is there a way to access this list via python?
-
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 likeOcube
). - 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 viac4d.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 -
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.