H2 detect what plugins are used in a scene
-
On 17/10/2015 at 07:14, xxxxxxxx wrote:
How can I detect which plugins are used in a scene?
I know how to get a list with all plugins (c4d.plugins.FilterPluginList
(type, sortbyname)
but that is a huge list and the non cinema 4d plugins are hard to detect.Using type is not an option, because there is no "non cinema 4d type":
PLUGINTYPE_ANY Any. PLUGINTYPE_SHADER 2D Shader. PLUGINTYPE_MATERIAL 3D Shader. PLUGINTYPE_COMMAND Command (menu) plugin. PLUGINTYPE_OBJECT Object plugin. PLUGINTYPE_TAG Tag plugin. PLUGINTYPE_BITMAPFILTER Bitmap filter. PLUGINTYPE_VIDEOPOST Videopost effect. PLUGINTYPE_TOOL Tool Plugin. PLUGINTYPE_SCENEHOOK Scene Hook. PLUGINTYPE_NODE Node Plugin. PLUGINTYPE_LIBRARY Library. PLUGINTYPE_BITMAPLOADER Bitmap loader. PLUGINTYPE_BITMAPSAVER Bitmap saver. PLUGINTYPE_SCENELOADER Scene loader. PLUGINTYPE_SCENESAVER Scene saver. PLUGINTYPE_COREMESSAGE Core message. PLUGINTYPE_CUSTOMGUI Custom GUI. PLUGINTYPE_CUSTOMDATATYPE Custom datatype. PLUGINTYPE_RESOURCEDATATYPE Resource datatype. PLUGINTYPE_MANAGERINFORMATION Manager information plugin. PLUGINTYPE_CTRACK Track plugin. PLUGINTYPE_FALLOFF Falloff plugin. PLUGINTYPE_PREFS Preference hook. _<_t_>_
Is there perhaps a plugin id range I can check.
For example, plugin id's > 1000010 are non cinema 4d plugins?-Pim
-
On 17/10/2015 at 09:22, xxxxxxxx wrote:
The plugins you get with FilterPluginList() give you the list of installed plugins, not the ones in a scene.
Anyway, I have a very similar problem. I'd like to get a list of all plugin IDs that are used in the scene
(don't care if they come with Cinema 4D or are third party plugins). -
On 18/10/2015 at 00:20, xxxxxxxx wrote:
One option is to scan the plugin folder for plugins,but that might not be the best way.
Also, looking at the plugin id's,I do not see any logic.
No developer or cinema 4d internal range.Another option might be to travel through the whole hierarchy and check for object = Oplugin?
But of course, plugins are not always objects.
_
_
Let's wait until someone from Maxon gets back on this question.-Pim
-
On 18/10/2015 at 00:50, xxxxxxxx wrote:
Here an example of scanning the plugin folder.
It will give you all (?) plugins, but you still do not know whether the plugin is used within the scene.#by scanning plugin folder pluginformats = [".cof", ".cob", ".cdl", ".cdl64", ".dylib", ".pyp", ".pype"] app = c4d.storage.GeGetStartupApplication() dir, file = os.path.split(app) pluginFolder= os.path.join(dir, "plugins") for path, dirs, files in os.walk(pluginFolder) : for plugins in files: filename, file_extension = os.path.splitext(plugins) #print file_extension if file_extension in pluginformats: print plugins
-
On 18/10/2015 at 02:22, xxxxxxxx wrote:
After some more thoughts.
I my case, I only need to know plugins that effect the render. So, only object and tag plugins. No command plugins, etc.
So, I need the travel through the hierarchy, including tags, and search for object plugins and tag plugins.-Pim
-
On 18/10/2015 at 06:15, xxxxxxxx wrote:
plugins that affect rendering are many, at least I can think of:
object plugin, tag plugin, SceneHook plugin, CustomDataType plugin, CustomGui plugin, Message plugin. Material plugin, Shader plugin -
On 18/10/2015 at 07:55, xxxxxxxx wrote:
Oops, that makes it more difficult, but you are right.
-Pim
-
On 19/10/2015 at 04:06, xxxxxxxx wrote:
Hi,
as you already discussed, it's not that easy. In fact I know no way to differentiate an installed plugin from an internal plugin.
If it's only for a list of names of installed plugins, then scanning the plugins folders (don't forget the one in user's home directory) might be the easiest.
Otherwise you have to search the entire scene content (as Mohamed already pointed out).
The Active Object Dialog example from the cinema4dsdk examples could give you a starter there.
Another option could be to start with a clean version of C4D, scan for all plugins to get a base database. Afterwards you could then look for additional ones to get the installed ones. But that's of course no quick solution and would be highly version dependent. -
On 19/10/2015 at 04:32, xxxxxxxx wrote:
Hi,
Thanks for the clarification and the hints.
Is it not possible to use the plugin id?
In my opinion there should be some logic behind the id's.
Especially that external developers have to request an id.I am developing a plugin to interface with a renderfarm.
One option of course is the test what plugins are used and are they supported by the renderfarm.-Pim
-
On 19/10/2015 at 05:41, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Hi,
Thanks for the clarification and the hints.
Is it not possible to use the plugin id?
In my opinion there should be some logic behind the id's.
Especially that external developers have to request an id.
I am developing a plugin to interface with a renderfarm.
One option of course is the test what plugins are used and are they supported by the renderfarm.
<span style="line-height: 1.4;">-Pim</span>It's not that only external developers have to request an ID, Maxon developers use the same service to request an ID - therefore you can't just differentiate (e.g. by a special bit) if this is a plugin create by Maxon or a 3rd party.
Best regards,
Wilfried
-
On 19/10/2015 at 12:19, xxxxxxxx wrote:
Ok, I did not know that.
IMHO I would advise to make a distinction between internal and external developers.-Pim
-
On 21/04/2016 at 06:29, xxxxxxxx wrote:
Is it not possible to distinguish native plugin from custom plugin by trying to fetch filename?
As far as I have tested, all my installed plugins have info returned by this method, whereas native plugins just return empty strings.However, the trickier goal is to actually find a solution, which plugins are actually used in the scene and affect rendering. As far as I know, It's possible to do that with video post plugins