Help setting up perforce integration

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