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

    Changing material preview scene

    SDK Help
    0
    4
    327
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 30/09/2007 at 11:46, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.1 
      Platform:      
      Language(s) :     C++  ;

      ---------

      Can anyone help me out with how to change a basic material to a different built-in preview scene?

      TIA
      - Rick

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 01/10/2007 at 03:56, xxxxxxxx wrote:

        I think one of the shader examples in the SDK uses a custom preview scene, that might help you get started.

        regards
        /Filip

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 02/10/2007 at 03:59, xxxxxxxx wrote:

          This is how you change the preview to one of the build-in scenes for a standard Cinema4D material.

          > _
          > GeData d;
          >      if(mymat->GetParameter(DescLevel(MATERIAL_PREVIEW),d,0))
          > {
          >      MaterialPreviewData *mpd = (MaterialPreviewData* )d.GetCustomDataType(CUSTOMDATATYPE_MATPREVIEW);
          >      if(mpd)
          >      {
          >           mpd->SetPreviewType(MatPreviewTorus);
          >                mymat->SetParameter(DescLevel(MATERIAL_PREVIEW),d,0);
          >      }
          > }
          > _

          You find the other definitions for the preview type in the docu under MatPreviewType.

          cheers,
          Matthias

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 05/10/2007 at 16:10, xxxxxxxx wrote:

            thanks Matthias - that's exactly what I needed

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