plugins folder, now you see me, now you don't.



  • Hi Daniel, thanks for reaching out us.
    I've spent some time to see how the different builds behaved and these are my findings.
    The following builds have been run with a clean installation (their respective preferences folder were deleted) both on macOS and Windows

    • 20.011_RB245938
    • 20.026_RB251664 (SP1)
    • 20.028_RB255810 (SP1HF01)
    • 20.030_RB257898 (SP1HF01)
    • 20.057_RB269127 (SP2HF01)
    • 20.059_RB272827 (SP2HF02)
    • 21.022_RB288344 (RC)
    • 21.026_RB290015 (RCHF01)

    They ALL showed the following behaviors:

    • the plugins folder is created in the user preference folder at the first start of the application;
    • the plugins found inside the <user prefs>/plugins are loaded automatically without the need to specify the search path inside Preferences -> Plugins;

    The sole different behaviors have been spotted when the <user prefs>/plugins is included in the search path in Preferences -> Plugins:

    • in R20.xxx no plugin is loaded twice resulting in no duplicated IDs;
    • in R21.xxx plugins are loaded twice resulting in duplicated IDs;

    Unfortunately the above behaviors, and I can't explain why, are pretty different compared to yours and this might require a deeper discussion to understand what's causing this.

    With regard to your initial question on where/how to install a plugin our recommendations are:

    • do not install a plugin in the Cinema 4D application folder
    • do not install a plugin in the Cinema 4D user's preferences folder
    • do install a plugin in a custom folder where the user has proper access rights;
    • modify the search path in Preferences -> Plugins (in R21 a plugins.json file is created in the user preference folder to programmatically achieve this)

    Final, and personal, recommendation is to take advantage of installation scripts/tools, rather than of simply unzipping an archive, to:

    • install different plugin versions for different Cinema versions by shipping a single package;
    • check for elevated rights during installation
    • suggest initial path where the plugin can be installed
    • perform post-installation scripts to finalize the installation process by setting paths, flags or creating links.

    Best, Riccardo



  • @r_gigante
    Thanks for taking the time to perform all these tests.

    From this I have at least learned that the plugin folder is created during the first launch of the application. It can thus be after the installation of the original R20.0xx (apparently R20.011) I had been looking for a plugins folder in order to already "install"plugins, prior to launching the application.

    I am sorry that all this time spent doesn't provide for a conclusive answer, since both our findings are contradicting. I will spend some time rechecking my findings, just to make sure ...

    However, the recommendations for plugin installation is quite a surprise, in particular the second bullet:
    "do not install a plugin in the Cinema 4D user's preferences folder".
    That is exactly the location where the plugin folder gets created at first launch of the application, so I am confused this location is not recommended.



  • Further testing.

    R20.059
    Step 1.

    • plugins available in <user_prefs>\plugins and copied to D:\R20plugins
    • preferences has paths to both, both checkboxes enabled.
      Relaunch Cinema 4D, which reports colliding pluginIDs in the console window

    Step 2

    • plugins available in <user_prefs>\plugins and in D:\R20plugins
    • preferences has paths to both, <user_prefs>\plugins unchecked, D:\R20plugins checked
      Relaunch Cinema 4D, plugins loaded, no collisions reported in console

    Step 3

    • plugins available in <user_prefs>\plugins and in D:\R20plugins
    • preferences has paths to both, <user_prefs>\plugins checked, D:\R20plugins unchecked
      Relaunch Cinema 4D, plugins loaded, no collisions reported in console

    Step 4

    • plugins available in <user_prefs>\plugins and in D:\R20plugins
    • preferences has paths to both, both unchecked
      Relaunch Cinema 4D, plugins loaded, no collisions reported in console

    R21.026
    Step 1

    • plugins available in <user_prefs>\plugins and in D:\R21plugins
    • preferences has paths to both, both checkboxes enabled.
      Relaunch Cinema 4D, colliding pluginIDs reported in console

    Step 2

    • plugins available in <user_prefs>\plugins and in D:\R21plugins
    • preferences has paths to both, <user_prefs>\plugins unchecked, D:\R21plugins checked
      Relaunch Cinema 4D, colliding pluginIDs reported in console

    Step 3

    • plugins available in <user_prefs>\plugins and in D:\R21plugins
    • preferences has paths to both, <user_prefs>\plugins checked, D:\R20plugins unchecked
      Relaunch Cinema 4D, plugins loaded, no collisions reported in console

    Step 4

    • plugins available in <user_prefs>\plugins and in D:\R20plugins
    • preferences has paths to both, both unchecked
      Relaunch Cinema 4D, plugins loaded, no collisions reported in console

    Current results of R21 seem to fit your findings, I must have mixed up results of R21.026 with those of R20.059
    Meaning that, indeed, R20.057 (on one machine) matches with the results of R20.059 (on the other machine), no collisions when duplicate paths.

    However, I don't understand step 3 on R21.026 doesn't report colliding pluginIDs.
    I just don't get it.



  • Hi Daniel, thanks for following up.

    I've reproduced your cases and I warmly encourage you to test them again since I found a few discrepancies.

    • R20.059
      • case 1: behavior confirmed
      • case 2: behavior not confirmed: I got collision since the plugins are loaded by default from the <user prefs>/plugins folder (even though unchecked) and from the <whatever>/R20plugins folder still checked in the search path. This behavior is consistent with the finding in my previous post since R20.xxx loads by default anything it finds in the <user prefs>/plugins folder
      • case 3: behavior confirmed
      • case 4: behavior confirmed
    • R21.026
      • case 1: behavior confirmed although I see two collisions for every plugin. This is correct since Cinema loads the plugins 3 times, the first by default from <user prefs>/plugins, the second because of the presence of the <user prefs>/plugins in the search path, the third because of the presence of the <whatever>/R21plugins in the search path
      • case 2: behavior confirmed
      • case 3: behavior not confirmed: I got collision since the plugins are loaded by default from the <user prefs>/plugins folder (even though unchecked) and from the <user prefs>/plugins folder still checked in the search path. This behavior is consistent with the finding in my previous post since R21.xxx doesn't exclude the <user prefs>/plugins folder if is specified in the search path
      • case 4: behavior confirmed

    Finally with regard to

    However, the recommendations for plugin installation is quite a surprise, in particular the second bullet:
    "do not install a plugin in the Cinema 4D user's preferences folder".
    That is exactly the location where the plugin folder gets created at first launch of the application, so I am confused this location is not recommended.

    we think that plugins preferences or user-dependent plugin files might be stored in the <user prefs>/plugins while the actual plugin should be stored in a more convenient location. Last but not least although not planned in the short future, the <user prefs> folder might change in structure and location (usually it depends on OS) and this might cause side effects to plugins stored over there.

    Best, Riccardo



  • @r_gigante

    Tested again, same results.

    R20.059
    case 2: <user_prefs>\plugins unchecked, D:\R20plugins checked
    -> restart -> no collision

    R21.026
    case 3: <user_prefs>\plugins checked -> no collision.
    I really don't get this as I remember having had collisions when I first tried this.

    I have tried following:
    Removed all paths from the preferences, restart Cinema 4D. Obviously, plugins are loaded due to the default folder, and no collisions since no other path is defined.
    I then add the <user_prefs>\plugin folder again, checkbox enabled. Restart -> no collisions.

    Went a step further:
    I had the <user_prefs>\plugins folder added, then added the <user_prefs> folder (without the "plugins" subfolder) -> restart -> no collision

    Went even crazier:
    With above 2 paths available (and enabled), I added D:\R21plugins
    -> restart -> collisions !!!

    Final case:
    removed the D:R21plugins, then copied the plugins in the <user_prefs>
    resulting in
    <user_prefs>\plugins
    <user_prefs>\plugins - Copy
    Added both paths to the preferences, both enabled -> restart -> collisions
    Removed the copy path from the preferences keeping only <user_prefs>\plugins
    -> restart -> no collision

    Cannot explain the behavior.

    I think I will stop the whole topic here, it seems to make no sense at all.



  • I'm sorry Daniel you're giving it up here, but I dunno how I can be of any further help. I will ask today to one of the other members of the team to replicate the same steps on his system to see if they are consistent with my findings or yours to grant information correctness for those coming in the future and reading the post.

    Best, R.



  • hello,

    I've tested with R20.059 and 21.026 and the behavior are the same than @r_gigante. (we talked about it to be sure)

    Cheers,
    Manuel



  • @r_gigante
    I am not actually giving up, just mentioning that it doesn't seem to make sense pursuing with this topic. As it seems we're not experiencing the same behaviour, as if we're using a different version (although it seems to be the same version number) or we're performing different actions.

    Now, I added a new plugin and could not reproduce my previous result with R20.059, as it now always seem to collide whatever I try.
    However, with R21 -which was mentioned should always collide- ... well now I get no collisions. According to the printscreen I made you can notice the only path added to the preferences is the <user_prefs>\plugins, exactly the same as the "internal default", still the console shows no collisions.

    According to both of you, this is not reproducible at your end. Still I am getting this result. I must then have done something differently than both of you?
    Note, the screenshot is right after launching Cinema 4D, and opening the console window and the preference window. No changes performed, simply opening the windows.

    R21 plugins not colliding.png



  • hello,

    with the same parameters, I got collision. Would it be possible to test with our sdk ?
    (it should not be different but at least you would test with the same plugin than us)

    Cheers,
    Manuel



  • @m_magalhaes

    I have built the sdk samples and copied the res folder and the created xdl64 file into
    C:\Users\Daniel\AppData\Roaming\Maxon\Maxon Cinema 4D R21_64C2B3BD\plugins\sdk

    Starting Cinema 4D without any paths in the preferences and plugins get loaded. No message in the console.

    Then adding the path:
    C:\Users\Daniel\AppData\Roaming\Maxon\Maxon Cinema 4D R21_64C2B3BD\plugins
    to the preferences, restarting Cinema 4D ...
    Plugins get loaded, no message in the console window. Thus no collision.



  • Hi Daniel, thanks for following up again.

    Just to be sure nothing get's neglected I've recorded a video showing that also doing your steps is consistent with what me and Manuel have reported with regard to R21
    You can see the video here.

    Best, Riccardo



  • Thanks for video.
    I have a slight suspicion about the reason we have different results. Similar to that other discussion point about memory leaks that you guys also can't seem to replicate.
    But to figure this all out I will need to purchase some extra hardware ... might take a while before I get the funds collected. I will then report back, in both topics.



  • I now have upgraded the original laptop which was running R20.057, and now have Windows 10.
    As such with a clean install, I have now R20.059 installed (clean, not updated) and R21.026 (also clean, not updated from 21.022).
    Both versions have plugins installed in the <user_prefs>/plugins folder. Without any path added to the Cinema 4D preferences they both load the plugins as is.

    For testing purposes I have added the path to this folder in both releases.
    With R20.059 I get collisions, which I didn't get with R20.057 on this same laptop running Windows 8.1
    With R21.026 I do not get collisions

    I thus experience the same results as those I had with the original installs on "the NUC" (see the memory-leak topic). I had hoped the results would be different, as was clarified by the memory-leak topic, but alas the presence of a dedicated/discrete graphic card has no impact on the result this time.

    But still, I now have 2 machines which both have clean installs and provide same results as to collisions/no-collisions, and still contradict the results you both have experienced. And this for both R20.059 and R21.026.

    I am not sure were to go from here?



  • hello,

    I confirm it's strange.

    Could you use the g_console=true and g_logfile=d:\logfile.txt as said in this page
    (both will contain the same lines)

    Send us the logfile (sdk_support@maxon.net) if you don't want to share that in public.

    Cheers,
    Manuel


Log in to reply