Tk-maya read another config rather than uploaded config?

Hi @johnnyzxt!

Checking the Cache

So first off this link can help you find your cache folder on mac.

What happens when using an uploaded config, is that you will have a cached pipeline_configuration.yml file stored in:

/Users/{UserName}/Library/Caches/Shotgun/{YourSiteName}/p{Project 
 ID}c{PipelineConfiguration ID}.basic.maya/cfg/config/core/install_location.yml

In that file it should have a line that looks a bit like this:

source_descriptor: {entity_type: PipelineConfiguration, field: uploaded_config, id: 859,
  type: shotgun, version: 5192}

This should confirm which version of the config your project is using from the bundle cache.
You can then check in:

/Users/{UserName}/Library/Caches/Shotgun/bundle_cache/sg/{YourSiteName}/v5192

To see that actual config it will use.

Checking cache location from Maya

Also in Maya when launched with Shotgun you could run the following in the Maya Python script editor:

import sgtk
engine = sgtk.platform.current_engine()

# Get the project cached config location.
engine.get_project_cache_location(engine.context.project["id"])
# Result: /Users/{username}/Library/Caches/Shotgun/{sg site name}/p89c859.basic.desktop/tk-maya


# Get the config location in the bundle cache.
engine.sgtk.configuration_descriptor.get_path()
# Result: /Users/{username}/Library/Caches/Shotgun/bundle_cache/sg/{sg site name}/v5192

Why it may not be working

By default, the tk-config-default2 will be cached when you select the project in SG Desktop. When you launch the software from Desktop it will not recache the config, and Maya for example will use the Desktop cache, so you will see that the cached folder is likely pointing to something like p89c859.basic.desktop rather than p89c859.basic.maya. In order for your changes to be pulled, you will need to jump out of the project in SG Desktop and back in again, and relaunch Maya.

If you’re making dev changes I would recommend using the dev descriptor to make rapid changes and then switch to uploaded config once you’re ready to deploy to production.

3 Likes