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

    Checking given link is a material

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 368 Views
    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 Offline
      Helper
      last edited by

      On 24/12/2017 at 04:16, xxxxxxxx wrote:

      I have a dialog field where the user can input a material.
      I only want to accept materials, so I added ACCEPT{5703;}

      But I know there are other options for materials.
      For example Shaders, Octane materials, etc..

      What is the best way to accept only (all) materials?

      LINK MATLINK {ACCEPT{5703;};}
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 26/12/2017 at 03:41, xxxxxxxx wrote:

        Hi Pim,

        To accept any material use Mbase (base type ID for materials) instead of Mmaterial (Cinema standard material ID, 5703 ).
        To accept any shader as well add Xbase; inside ACCEPT{}.

        It is also possible to filter the accepted elements inside a LINK with MSG_DESCRIPTION_CHECKDRAGANDDROP. See LINK C++ API docs.

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