0

maya reference name

Hi,

   is there a place where i can hook the name for the reference file in maya. So now, if i am importing the latest asset in maya with the loader, the name of the asset is: "publishname_version_assetname" or something like this. Is there a way to change this and giving the specific name i want? Something like just the asset name?

 

Thank you.

3 comments

  • 0
    Avatar
    Benoit Leveau

    Hi,

    I think you could achieve that in the "hook_add_file_to_scene" hook of tk-multi-loader.

    In the execute you are given the file_path and the shotgun_data. The asset name is given by shotgun_data["entity"]["name"]. So you could easily rename the node that was loaded to the asset name after it was loaded.

    Use the return_new_node parameter (or something like that) from the maya.cmds.file command to get the node.

    Benoit

     

  • 0
    Avatar
    Pierre-Luc

    Ok, i will try that.

  • 0
    Avatar
    Pierre-Luc

    Thank you :O)

Please sign in to leave a comment.