Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Feature/optional last workfile launch #365

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Jul 21, 2020

Issue

  • launching of last workfile is implemented but is not possible to turn it off (in Maya)

Enhancement

  • would be good to be able set opening last workfile also per task name

Changes

  • definition of opening is based on presets ~/pype-config/tools/workfiles.json
    • filtering is similar to extract review
  • presets structure
{
    # Is list of dictionaries
    "last_workfile_on_startup": [
        # Host `maya` won't open last workfile by default
        {
            "hosts": ["maya"],
            "startup": false
        },
        # Last workfile is opened if `maya` is launched on task `animation`
        {
            "hosts": ["maya"],
            "tasks": ["animation"],
            "startup": true
        },
        # Item with not set `hosts` and `tasks` can be used as default value
        {
            "startup": true
        }
    ]
}
  • function should_start_last_workfile for determination is implemented in avalon-core to be able use it for launching from avalon-launcher
  • by default opening of the last workfile is turned off (in case there is missing preset or is not set at all)
  • the default value when preset is not set can be overriden with environment variable AVALON_OPEN_LAST_WORKFILE
    • valid values are "true", "false", "yes", "no", "1", "0"
    • the environment variable is overriden with "1" (as True) or "0" (as false) when application is launched to be able access result of should_start_last_workfile inside application (may be handy e.g. for triggering workfiles tool if there is none workfile yet)

Important

Implementation of opening the last workfile for each host is not part of this PR!!!

🏴 This PR depends on
avalon-core ynput/avalon-core#167
pype-config ynput/pype-config#69

@mkolar
Copy link
Member

mkolar commented Jul 22, 2020

Agent Milan Kolar linked Freshdesk ticket 14 for this issue.

@mkolar
Copy link
Member

mkolar commented Jul 26, 2020

Can't make this work. as soon as I turn pull the branches open of the workfile stops working altogether. Maybe I'm setting it up wrong, but we can check tomorrow. This needs to be in 2.11 so priority for Monday please.

@mkolar mkolar merged commit 962feb5 into release/2.11.0 Jul 27, 2020
@mkolar mkolar deleted the feature/optional_last_workfile_launch branch July 28, 2020 07:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants