Help setting up perforce integration

Can anyone help me in setting up the perforce integration? I have tried to set it up but just can’t seem to get it working. I got the following error when trying to get it set up and thought I updated the correct framework file but its still not working.

ERROR: The frameworks section in environment file
'/home/<user>/private/.shotgun/bundle_cache/sg/flightschool/v714/env/asset.yml'
is a reference to another file. This type of configuration arrangement cannot
currently be automatically modified - please edit it by hand! Please add the
following to your external framework include: tk-framework-perforce_v0.x.x: {
location: {'version': 'v0.1.15', 'type': 'app_store', 'name':
'tk-framework-perforce'} }. If the framework has any settings, these need to
be added by hand.
4 Likes

The perforce framework isn’t worth using. It’s much more maintainable to roll your own at this point.

Create a generic hook that has syncing and checkout functions in it.
Use that as the base hook for any tk-multi-workfiles2 and tk-multi-loader hooks.

A publish plugin can handle submitting files.
I create items for the scene and any textures or other files you want to submit.

Accept any file that is currently checked out and I always accept the item for the current scene.

Validate makes sure files are checked out, I also create a “perforce_files” property on the root item that is an empty set.

Publish each item adds their path to the perforce_files on the root item.

Do the submit in a Post Finalize hook incase any other plugins need to export something in their finalize phase.

In the PublishedFile enity just store the local path. Too much stuff breaks if you try to store a perforce path in there.

Case sensitivity can be an issue I had to modify tk-mulit-publish2 and tk-core to fix that.

I modified tk-multi-workfiles2 to add a hook to be able to show files that aren’t synced and haven’t been published.

I have pull requests open for workfiles and publish


For core I had to add ‘COLLATE NOCASE’ to some of the sql statements. Although I might have been able to get around that with a schema change.

There are some other minor things you’ll probably run into but those were the big issues I had while setting us up.

6 Likes

HI Joes!

(I’m mostly replying because I wanted to say that :slight_smile: )

Joe K, as we discussed today, the Perforce integration in its current state is deprecated; it doesn’t work with default2 config, workfiles2, publish2, loader2, etc.

Joe H, though it’s a bummer that you had to, it’s awesome that you were able to roll your own solution. Thanks for sharing it back with us.

I’ll mention that with other projects taking priority, we haven’t had the resources to devote to bringing the Perforce integration up to speed with the new configs/apps thus far, but we heard the need for it from clients loud and clear at SIGGRAPH this year. You can see in our public roadmap that it’s currently in the “Considering” category. We’re aware that it’s important for folks, but you can vote for it there. And once we do work on it, we’ll definitely take a look at those PRs – again, thanks so much for submitting those.

4 Likes

Hello all thank you so much for all the help. I was able to just integrate our studios previous perforce api and tools into our shotgun took kit here so no issues anymore just figured it would be a bit nicer if I was using something natively supported and build by the shotgun team. Hopefully there will be a native integration in the future but for now our api works just fine! @jhultgre Thank you so much for the info that is basically what our studios api has been using so I will continue using that for now! :slight_smile:

2 Likes