2

Customizing Shotgun Shot Actions / launching multiple versions of Maya

Hi!

We've got a project that is going to need to start at least Maya 2013 and Maya 2014 (maybe even 2012). How would one setup the Shotgun WebUI to have these 3 options in for example the Shot Actions menu? Using custom Action Items which need URLs can't really start local Maya instances... Since it's already possible to specify the path to which Maya to start, can we somehow customize the entries in the Shot Actions menu to include 'Launch Maya 2013' and 'Launch Maya 2012' ?

10 comments

  • 0
    Avatar
    Samsher Chahar

    Hi

    You will have to make changes in three files, which are paths.yml, app_launcher.yml and shotgun_task.yml (I prefer launching Maya from a task rather than shot but if you want to launch it from a shot, the idea is basically the same except you will have to edit shotgun_shot.yml instead of shotgun_task.yml) in your project's sgtk configuration.

    Below you will find what you need to change to have Maya 2013 and 2014 setup as sgtk menus. I'll leave Maya 2012 for you. Also note that you will need to set the paths(which is done in paths.yml) for the maya executable binary according to your setup. Be careful while making the changes a single typo or a mixture of tabs and spaces in these files will cause problems.

     

    Changes in paths.yml

    Locate the following lines

    maya_windows: 'C:\Program Files\Autodesk\Maya2012\bin\maya.exe'
    maya_mac: /Applications/Autodesk/maya2012/Maya.app
    maya_linux: maya

    change them to something like this.

    maya2013_windows: 'C:\Program Files\Autodesk\Maya2013\bin\maya.exe'
    maya2013_mac: /Applications/Autodesk/maya2013/Maya.app
    maya2013_linux: maya_2013
    maya2014_windows: 'C:\Program Files\Autodesk\Maya2014\bin\maya.exe'
    maya2014_mac: /Applications/Autodesk/maya2014/Maya.app
    maya2014_linux: maya_2014

    Changes in app_launcher.yml

    Locate the following lines

    launch_maya:
    engine: tk-maya
    extra: {}
    hook_app_launch: default
    hook_before_app_launch: default
    linux_args: ''
    linux_path: '@maya_linux'
    location: {name: tk-multi-launchapp, type: app_store, version: v0.2.14}
    mac_args: ''
    mac_path: '@maya_mac'
    menu_name: Launch Maya
    windows_args: ''
    windows_path: '@maya_windows'

    change them to something like this.

    launch_maya2013:
    engine: tk-maya
    extra: {}
    hook_app_launch: default
    hook_before_app_launch: default
    linux_args: ''
    linux_path: '@maya2013_linux'
    location: {name: tk-multi-launchapp, type: app_store, version: v0.2.14}
    mac_args: ''
    mac_path: '@maya2013_mac'
    menu_name: Launch Maya 2013
    windows_args: ''
    windows_path: '@maya2013_windows'

    launch_maya2014:
    engine: tk-maya
    extra: {}
    hook_app_launch: default
    hook_before_app_launch: default
    linux_args: ''
    linux_path: '@maya2014_linux'
    location: {name: tk-multi-launchapp, type: app_store, version: v0.2.14}
    mac_args: ''
    mac_path: '@maya2014_mac'
    menu_name: Launch Maya 2014
    windows_args: ''
    windows_path: '@maya2014_windows'

    Changes to shotgun_task.yml

    Locate the following line

    tk-shotgun-launchmaya: '@launch_maya'

    change it to something like this

    tk-shotgun-launchmaya2013: '@launch_maya2013'
    tk-shotgun-launchmaya2014: '@launch_maya2014'

     

    This should be enough.

     

    Cheers

    Samsher

  • 0
    Avatar
    Permanently deleted user

    Oh, I almost had it then. I just added the menu entries to the wrong file (shot.yml instead of shotgun_shot.yml).

    Now it works. Awesome, thanks! 

     

     

  • 0
    Avatar
    Ryan Mayeda

    Thanks Samsher!

  • 0
    Avatar
    Hannes Reindl

    Hi

    I followed all the steps discribed and shotgun does start the correct maya version but it doesn't load shotgun into maya the just getting me the error 

    # Error: Shotgun: Could not start engine: Include error. Could not resolve references for L:\tank\1310_schwarzwild\tank\config\env\shot_step.yml: Undefined Reference launch_maya! #

     

    when i change the name back form launch_maya2013 to launch_maya everythin works perfect except i can't start different versions then

  • 0
    Avatar
    Hannes Reindl

    My bad i overread shot_step.yml in the error, so you have to edit this file also to this:

    tk-shotgun-launchmaya: '@launch_maya', 
    tk-shotgun-launchmotionbuilder: '@launch_motionbuilder'
    

     to

    tk-shotgun-launchmaya2013: '@launch_maya2013', 
    tk-shotgun-launchmotionbuilder: '@launch_motionbuilder'
    tk-shotgun-launchmaya2014: '@launch_maya2014' 
    tk-shotgun-launchmotionbuilder: '@launch_motionbuilder'
  • 0
    Avatar
    Tim Crowson

    Sorry, feel free to delete that last comment (and this one too if you like!). After working with it some more I answered my own questions and got it all working fine.

  • 0
    Avatar
    Tim Crowson

    Since the advent of the multi-launch app, is the above info still complete and accurate? I'm running through this now and finding that I have to change a lot more than this just to prevent errors, but I still haven't successfully added new entries in Shotgun.

  • 0
    Avatar
    Willem-Jan van Rootselaar

    Hi tim,

    What where the problems you had? I have some problem that with multiple version setup the workarea is lost. Did you have a similiar problem?

  • 0
    Avatar
    Willem-Jan van Rootselaar

    Found the problem. the tk-shell can't needs to be different than the tk-desktop.  A bit weird maybe this is a bug?

     

    tk-shell:
        apps: {tk-multi-launch3dsmax: '@launch_3dsmax', tk-multi-launchmaya: '@launch_maya_2013ext', tk-multi-launchmaya: '@launch_maya_2013',
          tk-multi-launchmotionbuilder: '@launch_motionbuilder', tk-multi-launchnuke: '@launch_nuke',
          tk-multi-launchphotoshop: '@launch_photoshop', tk-multi-launchsoftimage: '@launch_softimage',
          tk-multi-screeningroom: '@launch_screeningroom', tk-shotgun-launchmari: '@launch_mari'}

     

    tk-desktop:
        apps: {tk-multi-launch3dsmax: '@launch_3dsmax', tk-multi-launchhiero: '@launch_hiero',
          tk-multi-launchmari: '@launch_mari', tk-multi-launchmaya2013: '@launch_maya_2013', tk-multi-launchmaya2013-5: '@launch_maya_2013ext', tk-multi-launchmotionbuilder: '@launch_motionbuilder',
          tk-multi-launchnuke: '@launch_nuke', tk-multi-launchphotoshop: '@launch_photoshop',
          tk-multi-launchsoftimage: '@launch_softimage', tk-multi-screeningroom: '@launch_screeningroom'}

  • 0
    Avatar
    Michael Oliver

    UPDATED! FYI there is a much cleaner way of doing this which KP outlines on the below support page:

    https://support.shotgunsoftware.com/hc/en-us/articles/115000067493#Configuring%20software%20launches

Please sign in to leave a comment.