Checking given link is a material



  • 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;};}
    


  • 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.


Log in to reply