Your Work Files (legacy version)

 

 

Manage your Work Files

Using this app you can change the current work area and browse work files and publishes. The app additionally provides 'Save As' and 'Change Version' commands for managing work files
By: Shotgun Software
Latest Version: v0.7.3 (prod)
For our version numbers, we follow the Semantic Versioning standard.
System Name: tk-multi-workfiles

Overview

This app forms the basis for file management in the Shotgun Pipeline Toolkit - essentially an app that lets you jump around quickly between your various Shots or Assets and gets you started doing working quickly. No paths need to be specified as the app manages that behind the scenes. The Workfiles app makes it easy to manage your work data inside a Work Area and makes it easy to share your work with others. Work files are written to a work location and get a version number as they are being created - for example you may call your work file geometry.v001 - Shotgun will validate this to make sure that the file name is valid and correct.

 

Documentation

We're working on full documentation and it will be coming soon. We'll make sure it's worth the wait!

Using {name} in Templates

The {name} token is an artist-driven string that can be used in templates. It allows artists to differentiate the files within their work area (and subsequent publishes) with descriptors of their choice. Different studio pipelines have different policies for artist input on naming, and workflows can be configured to utilize the {name} token with three levels of control:

  • Mandatory, artists must enter a {name} in order to save a file through Toolkit.
  • Optional, artists can enter a {name} if desired/necessary to save a file through Toolkit.
  • Not at all, artists do not have to and are not allowed to enter a {name} when saving a file through Toolkit.

Mandatory {name}

Toolkit's default configuration makes the {name} token mandatory, meaning artists must enter in a value when saving a file. The app configuration has a 'saveas_default_name' key that drives the initial value that appears in the Shotgun Save As dialog:

tk-multi-workfiles:
    ...
    saveas_default_name: scene
    ...
    template_publish: maya_shot_publish
    template_publish_area: shot_publish_area_maya
    template_work: maya_shot_work
    template_work_area: shot_work_area_maya

The specified templates must also include the {name} token as part of their definition:

shot_work_area_maya: '@shot_root/work/maya'
shot_publish_area_maya: '@shot_root/publish/maya'
maya_shot_work: '@shot_root/work/maya/{Shot}.{Step}.{name}.v{version}.ma'
maya_shot_snapshot: '@shot_root/work/maya/snapshots/{Shot}.{Step}.{name}.v{version}.{timestamp}.ma'
maya_shot_publish: '@shot_root/publish/maya/{Shot}.{Step}.{name}.v{version}.ma'

With this configuration, artists will not be able to do a Shotgun Save As without populating the {name}, and it will start with a value of 'scene' that can be changed in the UI:

Write Graph

Optional {name}

The {name} token can also be made optional, meaning artists can enter in a value when saving a file but don't necessarily have to if they don't feel it's needed and/or a studio has a convention where artists "opt in" to the {name} when the work they are doing dictates it. The 'saveas_default_name' key can still be used in this scenario to set an initial value, but it can also be set to an empty string ('') for the "opt in" case:

tk-multi-workfiles:
    ...
    saveas_default_name: ''
    ...
    template_publish: maya_shot_publish
    template_publish_area: shot_publish_area_maya
    template_work: maya_shot_work
    template_work_area: shot_work_area_maya

The specified templates must also use the optional key syntax to denote the fact that the {name} token may or may not be present:

shot_work_area_maya: '@shot_root/work/maya'
shot_publish_area_maya: '@shot_root/publish/maya'
maya_shot_work: '@shot_root/work/maya/{Shot}.{Step}[.{name}].v{version}.ma'
maya_shot_snapshot: '@shot_root/work/maya/snapshots/{Shot}.{Step}[.{name}].v{version}.{timestamp}.ma'
maya_shot_publish: '@shot_root/publish/maya/{Shot}.{Step}[{name}].v{version}.ma'

With this configuration, Shotgun Save As will start up with an empty {name}, and artists can choose to fill it in through the UI:

Write Graph

No {name}

Finally, the {name} token can be removed altogether, meaning templates will be fully defined for artists and they will not have to specify anything when saving files through Toolkit. In this case, the 'saveas_default_name' key in the app configuration is ignored, and the template definitions do not include {name} at all:

shot_work_area_maya: '@shot_root/work/maya'
shot_publish_area_maya: '@shot_root/publish/maya'
maya_shot_work: '@shot_root/work/maya/{Shot}.{Step}.v{version}.ma'
maya_shot_snapshot: '@shot_root/work/maya/snapshots/{Shot}.{Step}.v{version}.{timestamp}.ma'
maya_shot_publish: '@shot_root/publish/maya/{Shot}.{Step}.v{version}.ma'

With this configuration, Shotgun Save As will remove the text box that was used to receive text input for the {name} token, and artists will just be presented with the full output filename and path for confirmation before saving:

Write Graph
 

Related Apps and Documents

 

Publish

Multi Publish is a workflow app that artists can use to publish files to Shotgun. The app provides a simple UI on top of a highly customizable core that can be easily configured to publish any combination of files or data from a work scene and it's dependencies (e.g. the Maya scene, Nuke Script, OBJ's, Alembic Caches, Cameras, Textures, etc.). The multi publish app is used in all default configurations and can be easily configured to support workflows ranging from Alembic Cache generation in Maya to render publish in Nuke, art reference management in Photoshop or plate ingestion in the Shotgun and shell environments.

Scene Snapshot

A Shotgun Snapshot is a quick incremental backup that let's you version and manage increments of your work without sharing it with anyone else. Take a Snapshot, add a description and a thumbnail, and you create a point in time to which you can always go back to at a later point and restore. This is useful if you are making big changes and want to make sure you have a backup of previous versions of your scene.

 

Installation and Updates

Adding this App to the Shotgun Pipeline Toolkit

If you want to add this app to Project XYZ, in an environment named asset, execute the following command:

> tank Project XYZ install_app asset tk-maya tk-multi-workfiles

Updating to the latest version

If you already have this item installed in a project and you want to get the latest version, you can run the update command. You can either navigate to the tank command that comes with that specific project, and run it there:

> cd /my_tank_configs/project_xyz
> ./tank updates

Alternatively, you can run your studio tank command and specify the project name to tell it which project to run the update check for:

> tank Project XYZ updates

Collaboration and Evolution

If you have access to the Shotgun Pipeline Toolkit, you also have access to the source code for all apps, engines and frameworks in Github where we store and manage them. Feel free to evolve these items; use them as a base for further independent development, make changes (and submit pull requests back to us!) or simply tinker with them to see how they have been built and how the toolkit works. You can access this code repository at https://github.com/shotgunsoftware/tk-multi-workfiles.

Special Requirements

  • You need Shotgun Pipeline Toolkit Core API version v0.16.31 or higher to use this.
 

Configuration

Below is a summary of all the configuration settings used. These settings need to be defined in the environment file where you want to enable this App or Engine.

sg_entity_types

Type: list

Default Value: [u'Shot', u'Asset']

Description: List of Shotgun Entity Types to include in the listings when picking a work area.

template_publish

Type: template

Description: A reference to a template which locates a publish file on disk.

launch_at_startup

Type: bool

Description: A flag whether to launch the UI at application startup. This option is not supported on all engines because of differences in the way some platforms start up. Currently, only maya nuke and 3ds Max support this option.

hook_scene_operation

Type: hook

Default Value: scene_operation_{engine_name}

Description: All the application specific scene operations (open, save etc) that the app needs to carry out are collected together in this hook.

saveas_default_name

Type: str

Default Value: scene

Description: The default name that gets used by when saving a work file using the save-as command

template_publish_area

Type: template

Description: A reference to a template which locates the publish directory on disk

file_extensions

Type: list

Description: List of file extensions to be shown in the work files view. If empty then all files that match the template will be shown.

saveas_prefer_version_up

Type: bool

Description: Control how the save-as command determines the inital name to be used. If set to True then the name from the current scene will be used and the version incremented. If False then a new unique name will be used and the version reset

hook_filter_work_files

Type: hook

Default Value: filter_work_files

Description: Specify a hook that, if needed, can filter the raw list of work files found for the current work area

hook_copy_file

Type: hook

Default Value: copy_file

Description: Specify a hook that will be used to copy the file 'source_path' to 'target_path'.

allow_task_creation

Type: bool

Default Value: True

Description: Controls whether new tasks can be created from the app.

template_work

Type: template

Description: A reference to a template which locates a work file on disk.

template_work_area

Type: template

Description: A reference to a template which locates the work directory on disk

sg_entity_type_filters

Type: dict

Description: Allows you to filter the entity types specified in the sg_entity_types setting. Uses shotgun API query syntax. For example, if you have specified Shot as an entity type you wish to display in the sg_entity_types setting, but you only want to show shots that are in progress in the task selector UI, you can set this up by specifying a filter. Like this: sg_entity_type_filters: {'Shot': [['sg_status_list', 'is', 'ip']]}

version_compare_ignore_fields

Type: list

Description: A list of fields that should be ignored when comparing files to determine if they are different versions of the same file. If this is left empty then only the version field will be ignored. Care should be taken when specifying fields to ignore as Toolkit will expect the version to be unique across files that have different values for those fields and will error if this isn't the case.

hook_filter_publishes

Type: hook

Default Value: filter_publishes

Description: Specify a hook that, if needed, can filter the raw list of publishes returned from Shotgun for the current Work area.

launch_change_work_area_at_startup

Type: bool

Description: A flag whether to launch a dialog at startup for the user to select the work area. This option is not supported on all engines because of differences in the way some platforms start up. Currently, only maya nuke and 3ds Max support this option.

task_extra_display_fields

Type: list

Description: List of the fields to use to display with the task name in the task browser.

sg_entity_type_extra_display_fields

Type: dict

Description: Specify additional fields to display for each entity type in the task browser. Each entry in the dictionary maps an entity type to a dictionary of 'label:field' name pairs. For example, to display the name of the sequence that a shot belongs to, specify: {Shot:{Sequence: sg_sequence.Sequence.code}}

sg_task_filters

Type: list

Description: Allows you to filter the Tasks linked to the entities in the sg_entity_types setting. Uses shotgun API query syntax. For example, if you only want to show Tasks that are in progress in the task selector UI, you can set this up by specifying a filter. Like this: sg_task_filters: [['sg_status_list', 'is', 'ip']]

 

Release Notes

Welcome to the release notes for this App. Below you will find an overview of all the changes we did for each release. We try to be as detailed as possible and include all bugs we have fixed, features we have added and things that may have changed. If you have questions about a particular release, don't hesitate to contact our support team!

v0.7.3

2016-May-5

Fixed an issue where a user could save over an existing file when not all template fields could be resolved.

v0.7.1

2016-Feb-19

Added user activity metrics for particular actions

v0.7.0

Adds context switching for Nuke Studio support.

v0.6.17

Matches engine instance name when looking up app settings.

Details:

When looking up app settings for a specific context, both the engine and instance names will be used to find the correct settings. Additional changes necessary for the Nuke/Hiero engine merge.

v0.6.15

Fixed a rare issue where opening a file in Maya could fail.

Details:

  • Implemented a workaround for an issue where Maya would sometimes fail to open a file, reporting that the current scene has unsaved changes.

v0.6.14

Fixed bug in work-file <-> publish matching

Details:

  • Previously work-files were not being matched correctly against their corresponding publishes when the work template contained keys not present in the publish template. This could result in the publishes being lost in the UI.
  • This has now been fixed.

v0.6.13

Fix to unicode strings causing Houdini operations to fail.

v0.6.12

Stopped the file manager from searching twice on start-up!

Details:

  • Previously the file manager was performing the same search twice on start-up before displaying a list of files - this has been fixed.

v0.6.11

Fixed issue with workfile version calculation

Details:

  • When opening an older published file as the next version of a work file, the file manager would previously always try to open it as version '1'. This would result in it trying to overwrite the actual version 1 of the work file if it existed. This has now been fixed and the published file will be copied to the next valid version of the work file.

v0.6.10

Fixed bug when key populated from the work area is optional, e.g. [_{Task}]

Details:

  • This fixes the problem where files weren't being found when a key that is populated with a value from the current work area is optional in the work file template but absent from the file name on disk.

v0.6.9

Fixed problem where Save-As would allow previous versions of a work file to be accidentally overwritten

Details:

  • When using Save-As to version up the current scene, depending on the configuration it could be possible to accidentally overwrite older versions of the file. This has been fixed.

v0.6.8

Save-As no longer saves when ESC is pressed

Details:

  • Previously, pressing ESC during a Save-As would result in the file being saved anyway as if Enter had been pressed. This has now been fixed.

v0.6.7

Adds Photoshop PSB support.

Details:

This release adds Photoshop PSB support. In order to save your Photoshop scenes as PSBs, simply update your templates.yml file entries for Photoshop (photoshop_shot_* and photoshop_asset_*) to use the extension .psb. Note that you won't be able to use .psd and .psb at the same time for the same entity type. Also, you need the tk-photoshop engine's version to be greater or equal to v0.3.0. Finally, you also need tk-multi-publish to be updated to v0.6.6 or greater.

v0.6.6

Version-Up now uses the same logic as Save-As when searching for work files

v0.6.5

Adjustments relating to the v0.15 core - added pre-switch synchronization to ensure folder caches are correctly populated.

Details:

This change requires the v0.15 core since it uses new API methods that were introduced in v0.15.0. It primarily addresses the edge case where items have been deleted remotely and you are switching into a part of the file system where this has happened. Without the synchronization that is introduced in this patch release, the Shotgun file manager would potentially get confused at this point and report errors back to the user. This fix ensures that cache metadata is up to date prior to syncing.

v0.6.4

Added option to specify additional fields to ignore when comparing file versions

Details:

This adds a configuration setting that can be used to specify additional fields to ignore in file paths when comparing them to find differing versions of the same file. For example, if the file name contains the user initials but all users should see these files as a continuous sequence of versions then this setting can be used to achieve this.

v0.6.3

Added support for the new 3DS Max Engine supporting MaxPlus and Max version 2015.

v0.6.2

Properly ensures folder exists before saving the current scene

Details:

  • Previously, if the work template included a dynamic non-entity folder (e.g. a folder based off the scene name), this wouldn't be created causing the save to fail!

v0.6.1

add sg_task_filters setting for filtering Tasks in the selector widget

Details:

This adds the sg_task_filters setting which allows you to add additional filters to control which Tasks are displayed in the Task selector widget when selecting your file to open or changing your context. For example, this can be helpful if you want to only allow artists pick up work for Tasks that are 'ip'.

v0.6.0

Tweak to allow the app to be used in Mari

Details:

  • Mari doesn't have the concept of a traditional scene file so it makes no sense for the file manager to be available.
  • Changing the current work area is still needed though
  • This change adds a special case for Mari so that the File Manager command is hidden

v0.5.7

added comments explaining workaround for Hiero bug not emitting kBeforeProjectLoad event

Details:

The Foundry has recorded

Bug 40413 - Python API - kBeforeProjectLoad event type is not triggered when calling hiero.core.openProject() (only triggered through UI) We're working around this by manually emitting the kBeforeProjectLoad event. When it's fixed in a future version, this code will have to be wrapped in a version check in order to prevent accidentally emitting the event twice (once by Hiero, and once by this our code).

v0.5.6

Various fixes and tweaks

Details:

  • Fixed an PyQt compatibility issue
  • Fixed a bug that would stop the version reset from working when performing a Shotgun Save-As under certain circumstances
  • Launch-on-startup is now enabled for 3ds Max

v0.5.5

Added setting to allow extra information to be displayed for entities in the Select Work Area and File Manager UIs

Details:

  • This setting can be used for example to display the Sequence that Shot entities belong to.

v0.5.4

Fixed issue where Updated By was displaying as Unknown

v0.5.3

Manually emit missing kBeforeProjectLoad signal from Hiero before loading project

v0.5.2

Code tidy-up and small refactor of find-files logic to be more maintainable.

v0.5.1

Performance tweak: Removed folder creation call from the save-as method.

v0.5.0

Now uses standard methods in the shotgun utils framework to handle thumbnail downloads.

v0.4.8

Fixed issue where creating a new task would sometimes break

v0.4.7

Added a missing import that could raise an exception when folders for a Task are yet to be created.

v0.4.6

Fixed issues with user sandboxes

v0.4.5

Bug fix when creating context from path.

v0.4.4

Fixed core dependency

v0.4.3

Minor bug fix

v0.3.42

Added a setting to display more info with task name in the task browser.

v0.4.2

Minor tweak to the scene operation open interface

Details: - this is so that the hook knows when the latest version has been requested

v0.4.1

Minor bug fix

v0.4.0

Changes to support Perforce workflow - Version is now optional in all templates - Save-As now correctly determines if a name has already been used - Added hooks to be able to filter/accentuate the list of publishes and work files - Open workflow has been tweaked to work more cleanly if the publish & work templates are identical

v0.3.41

Updated Perforce integration (limited release)

v0.3.40

Updated to use the latest version of the Widget Framework.

Details: This resolves a known issue causing thumbnail downloads to fail and in some cases crash when running this app in conjunction with a proxy server.

v0.3.39

Updated Perforce integration (limited release)

v0.3.38

Fix for Qt 4.6.2 compatibility.

Details: Fix for Qt 4.6.2 compatibility.

v0.3.37.1

Updated Perforce integration (limited release)

v0.3.37

Removed force-reset of Shotgun Write node render paths in the scene operation hook as it's no longer required for tk-nuke-writenode v1.0.0+

v0.3.36.1

Updated Perforce integration (limited release)

v0.3.36

Minor fixes

Details: - Fixed issue causing an unhandled exception when using save-as and name starts with a number - Change work area command is no longer available if there are no sg_entity_types specified in the configuration

v0.3.35.3

Minor bug fixes (limited release)

v0.3.35.2

Minor tweaks for Perforce integration (limited release)

v0.3.35.1

Initial Perforce integration (limited release)

v0.3.35

Changed the behaviour of the search box to persist across navigation

v0.3.34

Further optimisations to UI load times.

v0.3.33

UI Tweaks to address performance when lots of records are displayed

Details: Instead of displaying all records that are matching a search query, the UI now caps the number of records that are displayed. When this happens, a button appears which lets you load the entire dataset if desirable. This speeds up loading and searching.

v0.3.32

Create New Task now works correctly from 3dsMax/PyQt

v0.3.31

File right-click menus now work correctly in 3dsMax/PyQt

v0.3.30

Fixed minor bug when updating the UI if the current user isn't found in Shotgun

v0.3.29

Fixed a bug which caused the task browser to fail when tasks are not assigned to an entity.

v0.3.28

Motionbuilder hook now prompts user to save unsaved changes before opening another scene

v0.3.27

Updated to use the latest version of the widget framework (0.1.20)

v0.3.26

Fixed Python 2.5 compatibility issues and added initial support for Motionbuilder

v0.3.25

Restricted auto start options. Added next-gen 3dsmax support. Bug fixes.

v0.3.24

Added option to launch the app at startup. Fixed a bug relating to task creation.

v0.3.23

Updated to use the latest version of the widget framework (v0.1.18)

v0.3.22

Updated to require widget framework v0.1.17

v0.3.21

Exposed core functionality as methods on the app class

v0.3.20

Various fixes and improvements

Details:

  • New tasks can now be created from the Select Work Area dialog
  • Change work area is now available from the Work Area context menu allowing the Work Area to be changed without starting a new file
  • Shotgun Save-As now correctly handles non-ascii characters in the name

v0.3.19

Added additional debug logging.

v0.3.18

Minor bug fixes

Details:

  • Improved details displayed when an entity or Task has no description when changing work area
  • Fixed bug when multiple instances of the app are defined for an environment

v0.3.17

Added the ability to filter the entity listings in the task switch UI.

v0.3.16

Minor adjustments to exception handling in preparation of a context bug fix in the core API.

v0.3.15

Specifying an empty string for the default name to be used by the save-as dialog when the name is optional is now properly supported

v0.3.14

Updated to work correctly when name is either absent or optional in the configured templates

v0.3.13

Various features and improvements

Details:

  • Added ability to only display files for certain extensions in the file list through the file_extensions setting
  • The New File button is now enabled even if the selected entity is not yet in the path cache
  • Default name used by the save-as dialog can now be set in the configuration
  • Added option to prefer versioning up over using a unique name for the save-as dialog
  • Fixed error when selecting a work area that doesn't contain any files
  • Improved logic when determining a unique name for the save-as dialog

v0.3.12

Minor bug fixes

Details:

  • Fix to File Manager that can cause it to error when finding files
  • The correct current entity is now selected in the Change Work Area dialog

v0.3.11

Fixed bug when publishes are found without any corresponding work files

v0.3.10

Relaxed template validation in app manifest

v0.3.9

The file manager now makes better use of the Work Area context when resolving the work path whilst opening from the publish area

v0.3.8

Improved support for Softimage engine

v0.3.7

Improved Softimage Support. Added Photoshop Support.

v0.3.6

Minor bug fixes and addition of more debug output

Details:

  • Issue preventing Open commands working in 3dsMax has been fixed
  • Addition of debug output when changing Work Area

v0.3.5

Fixed missing project description in File Manager Work Area summary

v0.3.4

Improvements to the workflow around opening files using the Shotgun File Manager

Details:

  • The Publish area now only shows published file details
  • Addition of UI when opening a Publish or Work file if there is a more recent version available
  • Access via right-click to all available versions of Publishes and Work Files

v0.3.3

Bug fixes and better project support.

v0.3.2

Workfiles now supports arbitrary user keys when resolving user sandboxes

v0.3.1

Updated to use latest version of the widget framework

v0.3.0

Updated command names to be Shotgun instead of Tank

v0.2.18

Renames and support for the new name Sgtk.

v0.2.17

Renames and support for the new name Sgtk.

v0.2.16

Minor UI adjustments, added support for Softimage.

Details:

  • Now displays full task status names rather than short ones
  • Double clicking the task in the task pick dialog selects it and closes the UI
  • Added hook logic for Softimage

v0.2.15

Tank Save-As now uses the fields from the current context in preference to those from the current path

v0.2.14

Fixed issue when saving setting on Linux

v0.2.13

Finished Tasks are no longer excluded from the entity list when changing work area

v0.2.12

Fixed issue where Tank File Manager stops working if the current user is None

v0.2.11

Show my tasks only setting now gets preserved correctly on windows

v0.2.10

Added app icon.

v0.2.9

Updated to use the configured Published File Entity type.

v0.2.8

Fixed crash when changing Work Area in Maya 2013.5 on Windows

v0.2.7

Changed Maya save-as type to be explicit based on file extension

v0.2.6

The context is now passed as an additional parameter to the scene operation hook

v0.2.5

Various tweaks and UI improvements

v0.2.4

  • Various user interface tweaks and improvements
  • Fixed various issues stopping app from working with PyQt

v0.2.3

Polish and Adjustments

v0.2.2

Minor bug fixes.

Details:

  • Duplicate file names were previously shown in certain setups. This is no longer the case.
  • Minor UI tweaks.

v0.2.1

App now defines that it is compatible with any engine.

v0.2.0

First release to the Tank Store.

 
Follow

13 Comments

  • 0
    Avatar
    David van Heeswijk

    Hello!

     

    So all of a sudden we get "warning, unsaved changes" in Maya when we try to open a file from the Shotgun File manager. It also shows the location of the file, which is correct. But it refuses to open it.

    Any clue?

     

    Cheers,

     

    David 

  • 0
    Avatar
    David van Heeswijk

    Yes it does show that Dialog.

    When I try to run your command, that just works.

    When I try to open my file I get the attached dialog.

     

  • 0
    Avatar
    Sven Fraeys

    I was trying to use this app for mari.

    But how come that this app is available in mari if the update comments itself say that it does not work for mari since mari workflow is not compatible ?

    Can this app then be removed again from mari since it is just confusing ?

     Or can the app be useful for mari ?

    Thanks

    v0.6.0 : Tweak to allow the app to be used in Mari

    Details:

        Mari doesn't have the concept of a traditional scene file so it makes no sense for the file manager to be available.

  • 0
    Avatar
    Alan Dann

    Hi Sven,

    The Work Files app contains several related commands: File Open, File Save, Version Up and Select Work Area.

    As Mari doesn't really have the concept of a work file (typically each user just has their own local cache) it doesn't make sense to use the File Open, Save and Version Up commands.  However, toolkit still needs to know what the Work Area is that you are working in and you should still be able to change Work Area within Mari if needed (this determines which other apps are available and how they work).

    So although most of the functionality in the app isn't applicable to Mari, the Select Work Area command is and this is why the app is included for Mari in our default configuration.

    That said, in order to install and use this app inside Mari it does need to be configured in a specific way - see our default configuration for reference:

    https://github.com/shotgunsoftware/tk-config-default/blob/master/env/asset_step.yml#L335

    Specifically, you'll notice that all the publish and work templates are set to null as there is no such thing for Mari.

    Does that help clarify why this app is available for Mari?

    Thanks

    Alan

  • 0
    Avatar
    Sven Fraeys

    hello,

    Thanks for the explanation ! So that means we can perfectly change the context from within Mari ?

    I followed the config that you gave me. But now I receive following message in Mari.

    Unable to change the Work Area to:

    lod1, Asset TEST01

    Shotgun File Manager has not been configured for the environment being used by the selected Work Area! Please choose a different Work Area to continue.

    (Note: A common reason for this error is if you are using a Task based workflow but have not selected a Task in the Work Area.)

     

    lod1 is the task name, TEST01 name of the entity, in the work area picker I do see the tasks and select the task called lod1.

    Any suggestions ?

  • 0
    Avatar
    Alan Dann

    @Sven

    Sorry I missed your question from the 9th February.  If you are still having problems could you zip up your config and send it to toolkitsupport@shotgunsoftware.com and we'll take a look at why it's not working - it definitely should be!

    @David

    This might be happening if there is something wrong with the scene which stops it being saved correctly - are you able to save changes manually in Maya without errors?

    Thanks

    Alan

  • 0
    Avatar
    David van Heeswijk

    Well, if I just launch Maya (2015) from the browser and try to open up a file through the Shotgun File Manager, it first asks if my (clean) scene needs to be saved. I press no and the throws the unsaved changes error without opening the file.

    So my scene is pretty clean.

  • 0
    Avatar
    Alan Dann

    Hi David,

    Does it show the attached dialog?

    If so then could you try running the following command in the Maya Python script editor and see what that does?

    import maya.cmds as cmds

    cmds.file(newFile=True, force=True)

    Even though the scene appears empty, it's possible that something running in the background (through a script job, a plug-in, etc.) might be adding something to new scenes which Maya is having trouble with when it tries to execute a File->New operation.

    Thanks

    Alan

     

  • 0
    Avatar
    Alan Dann

    Hmm, that's coming from Maya - do you get the same thing when you run this?

    from maya import cmds

    file_path = "/Volumes/Server03_G/STORM-PIPELINE_SETUP/19_Shotgun_Shots/AFL01/VFX_SH003/3D/00_3D/01_Maya/scenes/SH003SCENE_v001.mb"

    cmds.file(new=True, force=True) 

    cmds.file(file_path, open=True)

    (This is basically the code that gets run from the scene operation hook when it tries to load a scene: https://github.com/shotgunsoftware/tk-multi-workfiles/blob/master/hooks/scene_operation_tk-maya.py#L66)

    Alan

  • 0
    Avatar
    David van Heeswijk

    Yes, this was the first thing I tried. But I get the same error in the script editor. I also tried deleting my Maya prefs folder to ensure Maya starts up without any scripts or plugins. But no luck. So strange, because I used this workflow hundreds of times before. I also tried reverting back to an older version of the workfiles app, but no luck either.

  • 0
    Avatar
    David van Heeswijk

    So I managed to fix this issue by adding a little flag to the Maya scene operation Hook.

    Now it looks like:

    cmds.file(new=True, force=True)

    cmds.file(file_path, open=True, force=True)

    Which is still strange, because it worked before. But hey, it works.

  • 0
    Avatar
    Patrick Macdonald

    I found the function, "generate_new_work_file_path" in "save_as.py". Pushing some values in to the missing fields appears to fix the problem but would require me to fork the app. Is there a way to push data in to these fields through a hook?

     

    For reference, I added the following two lines to the end of the function.

    fields["project"] = "Theproject"

    fields["userInitials"] = "AB"

    create the new path                

    new_work_path = self._work_template.apply_fields(fields)

    return {"path":new_work_path, "message":msg, "can_reset_version":can_reset_version}

     

  • 0
    Avatar
    Patrick Macdonald

    If I want the save-as dialog to cope with new custom fields (in this case {userInitials} and {project}, what file do I need to edit to provide this functionality? I can't see anything in the hooks that might allow me to populate custom fields, and I would prefer not to fork the entire app.

    My template file is loading fine, and I've achieved a similar template successfully using the hooks for primary publishing.

    max_shot_work:

            definition: '@shot_root/work/3dsmax/{project}_{Sequence}_{Shot}_{userInitials}_{Step}-{name}_v{version}_01.max'

    Thanks for any suggestions!

    Patrick.

Please sign in to leave a comment.