Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Question about AddUserPreviewScene

    SDK Help
    0
    3
    659
    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.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 20/02/2018 at 10:02, xxxxxxxx wrote:

          Hello Riccardo,

          thank you very much for the information 🙂

          kind regards, 
          Florian

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