1

Available apps determined by task or step

Hi

I wondered if there was a way to only show your app if your on a certain task or step?

So I have made an app that works with the 3dsmax engine, and I have it registered in an asset_task environment file. So now when I launch 3dsmax through shotgun in the context of a task, I can see my app in the list of apps. However I would only like this app to only be available if the context is a certain task name, or even step name.

I wondered if there was anything I could put in the app info.yml/manifest file, that would help limit its availability/visibility in the apps list?

It would also be nice to be able to customize this for the context options in shotgun as well, so it would only list 3dsmax if the task was only supposed to be a 3ds max task. Is there a way to do this as well?

 

Thanks

Phil

댓글 2개

  • 0
    Avatar
    Ryan Mayeda

    Hi Philip.

    Currently this is doable, but it requires you to split up your environments in a more granular way, which adds to the amount of configuration you have to manage.  To try this out, you'll need to tweak your pick_environment core hook: 

    https://github.com/shotgunsoftware/tk-config-default/blob/master/core/hooks/pick_environment.py

    In the default configuration, we split it by entity and whether or not there is a Step in the context.  If you want to have an app only appear in one Step's environment, you'll need to divide the environments up even further, so you'd end up with something like this:

    if context.entity and context.step:
        # we have a step and an entity
        if context.entity["type"] == "Shot":
            if context.step["name"] == "Anm"
                return "shot_step_anm"
            if context.step["name"] == "Comp"
                return "shot_step_comp"
            ...
            else
                return "shot_step"
        if context.entity["type"] == "Asset":
            return "asset_step"
    
    Next, define environment configurations for each Step, or at least each Step that's different, which will include your app that should only appear for a given Step and not other Steps.  Then, override the pick_environment core hook as documented here:

    https://support.shotgunsoftware.com/entries/95442818

    While this works, we think that this should be easier!  Generally speaking, we would like to make the environment configurations simpler rather than force clients to split them up even further.  So looking ahead, we will be investigating ways to handle the use cases you bring up so that they can be done in the same configuration.  We've also gotten similar feedback from other clients and it seems like the three main cases are:

    1. An app should only show up for a certain Task/Step (ex.. your case here).
    2. An app should be able to have different settings for different Task/Steps on the same entity (ex. publishing a model for an Asset has different publish options than a rig for an Asset).
    3. The available launch options should be able to be thinned out depending on what Task/Step is being worked on (ex. don't show Houdini for Compositors).

    Am I leaving anything out?  We'll keep this thread going and post updates with some new configuration syntax ideas as we get further along...!

    Ryan.

  • 0
    Avatar
    Rich Bobo

    I was looking for the same sort of task step granularity for an app I created. It's awkward that the user has to try launching the app, only to find out that it's not available in that task step context!

    It would be great to have more control.

    Thanks,

    Rich

댓글을 남기려면 로그인하세요.