Perforce .p4ignore and typemap generator for Unreal and DCC projects
Pick the tools your project uses and this free generator writes a Perforce .p4ignore file and p4 typemap entries for Unreal Engine 5 and common DCC files. The typemap gives binary scenes and assets exclusive locks. Dousen then shows those locks in the Blender, Maya, 3ds Max, Substance Painter and Substance Designer panels and, in Houdini, through the Dousen: File Status (P4) shelf tool (on demand).
- Runs in your browser. Nothing is uploaded.
- Output A is a
.p4ignorefile forp4 set P4IGNORE=.p4ignore. - Output B is a typemap that gives
.uasset,.umapand DCC scene filesbinary+lortext+l, so a checkout locks them exclusively. - Covers Unreal Engine 5, Blender, Maya, 3ds Max, Houdini, Substance Painter and Designer, Visual Studio and Rider.
How do I apply the files?
- Save the ignore file as
.p4ignorein the root of your workspace and runp4 set P4IGNORE=.p4ignore, without spaces around the=. Perforce then skips matching files when you add files or reconcile the workspace. - Ask a Perforce admin to run
p4 typemap. The command opens the typemap form, and changing it needs admin access. Paste the generated lines under the existingTypeMap:field and save. Later entries override earlier ones. - Do this before the first
p4 addof your content. The typemap only applies to files you add afterwards. To change a file that is already in the depot, runp4 reopen -t binary+l <file>and submit.
The typemap pattern has the form //depot/....uasset. The first three dots match every folder below the path, and the fourth dot starts the extension. Change the depot path above to scope the rules to one project.
Why does the typemap matter for binary assets?
Perforce can’t merge a .uasset, a .blend or a .max file. The +l modifier makes a checkout take an exclusive lock, so a second artist can’t edit the same file and then lose work at submit. Without it, two people can open the same file, and the second to submit has to throw one version away. The binary base type stores each revision as a whole file, and text+l keeps text formats such as Maya .ma as text while still locking them. If you uncheck Ignore Binaries/, build output such as .dll and .pdb gets binary+w so it stays writable, which Epic’s guide gives as the reason to set a typemap. The typemap also gives .fbx, .psd, .png, .tga and .exr binary+l whatever you select. Delete those lines if you don’t want exclusive locks on textures and exports.
The ignore file does the opposite job. It keeps generated folders such as Intermediate/ and DerivedDataCache/, editor caches and DCC backup copies out of your changelists. The Substance Painter option adds no ignore entries, because no documented backup folder name was verified for it.
How does Dousen show those locks?
The Dousen panel in Blender, Maya, 3ds Max, Substance Painter and Substance Designer reads live Perforce status with p4 fstat and refreshes about every 30 seconds. In Houdini, the Dousen: File Status (P4) shelf tool shows it on demand. A file locked by someone else shows Locked by <user> (CL n), and a publish stops before it exports if another user has locked a file the export would write. Checkout, revert, sync and add run under your own Perforce user, and they use the changelist of your active Jira task. With the typemap in place, an exclusive checkout from the panel is what produces the lock. Details are in File locks inside your DCC. For one DCC at a time, see Perforce in Blender and its sibling guides.
Which sources were used?
Each entry comes from one of these pages. Check them against your studio’s own rules before you submit the typemap.
- Using Perforce as Source Control for Unreal Engine (Epic Games): typemap, P4IGNORE syntax and the optional Binaries folder.
- P4IGNORE (Perforce): comment,
!,*, trailing-slash andp4 setsyntax. - p4 typemap (Perforce): field format,
....extpatterns and override order. - How to use Unreal Engine 5 with Perforce and P4 typemap (Perforce):
binary+lfor.uassetand.umap, and the modifiers. - Engine-agnostic P4 typemap and Ignore file for Unreal Engine projects with common DCC ignores (jase-perf, community): the file types,
binary+wbuild output, and Visual Studio, Rider and OS entries. - Best p4Ignore for Populating Perforce with UE4 Engine Source (Epic forums) and ue4-perforce (community): the
Saved/,Intermediate/andDerivedDataCache/list. - DCC backups: Blender Save & Load (
.blend1,.blend2), Maya swatches, 3ds Max file preferences (autoback,maxback.bak), Houdini hipFile (backup) and Substance Designer preferences (.autosave).
Related
- Perforce in Dousen
- Perforce in Blender
- One changelist per Jira task
- Unreal asset naming convention checker
Dousen is free during the studio beta, with access by request, and free forever for teams of up to 5 users. Request early access.