Question about AddUserPreviewScene
-
On 16/02/2018 at 10:22, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18.057
Platform: Windows ;
Language(s) : C++ ; XPRESSO ; PYTHON ;---------
Hello PluginCafe,I recently started plugin development in c++ and came across something I don't quite understand.
When experimenting with Materials and especially AddUserPreviewScene() i found (at least for me) something odd.
In my main.cpp I only have the usual PluginStart/Stop and Message methods.
In my PluginStart method I try to add a new preview scene for materials using AddUserPreviewScene.Here is my problem:
When I am adding a scene to a ID which is from a custom material I made everything works fine, and the scene only shows up at my material.According to the docs. when passing the ID 0 it should show up for every material.
But it doesn't show up on any of the standard nor my custom materials.
I checked the returned value from AddUserPreviewScene which was true meaning everything should have worked.
So why am I not seeing my custom scene on any of the materials?Hopefully someone can help me on that matter, really curious about that.
Thanks in advance,
Florian -
On 20/02/2018 at 01:47, xxxxxxxx wrote:
Hi Florian, thanks for writing us.
I confirm that the AddUserPreviewScene() doesn't work as reported in the documentation and passing 0 as ID value doesn't add a custom material preview scene to be used with any material. Passing instead a value of "-1" will do the trick ;).
I will update the documentation accordingly.
Best, Riccardo
-
On 20/02/2018 at 10:02, xxxxxxxx wrote:
Hello Riccardo,
thank you very much for the information
kind regards,
Florian