Results 1 to 3 of 3

Thread: How to use miTag as a string ( miTag of a char*)?

  1. #1
    Join Date
    Apr 2012
    Location
    Pune,India
    Posts
    15

    Default How to use miTag as a string ( miTag of a char*)?

    Can anyone tell me how I can send a string to my shader . I am using maya and am making a custom mental ray shader that needs the string to be sent to it . I have placed a shader parameter as string in the .mi file and miTag in the .c file . But it crashes when i try to render in maya . Please tell me what i am doing wrong i need to send the address of a file as a string to my mental ray shader .


    thanks

  2. #2
    Join Date
    Nov 2008
    Location
    Mantova
    Posts
    352

    Default

    you should post this question under 'mr Shaders - Getting Started' and not here.

    miTag map_file_name_tag = *mi_eval_tag ( &param->map_file );
    char * map_file_name = ( char * ) mi_db_access ( map_file_name_tag );
    mi_db_unpin ( map_file_name_tag );

    cheers

  3. #3
    Join Date
    Apr 2012
    Location
    Pune,India
    Posts
    15

    Default

    Thanks I needed that .

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •