FUSION · FULL ARTICLE
LayerRegex
LayerRegex applies an independent naming rule to each of two inputs. Transform renames, Keep retains matches and Remove deletes matches; Conflicts chooses the output Default/[Main].
Overview
Image 1 and Image 2 each have independent Expression, Mode, Name Template, Unmatched and Tester controls. One input does not inherit the other input’s rule. With two sources, validate each block separately, then the combined result and main layer.
Expression matches characters in the name. Parentheses create groups, referenced in Name Template by $1, $2 and subsequent numbers. The documented (.*) and Right.$1 example adds a prefix; $1.Right adds a suffix. Using $1 with (.*) returns the original name.
Transform renames matched layers. Keep filters for matching names; the manual explicitly describes removing the others. Remove deletes matches. Unmatched separately describes retaining or discarding nonmatches; Keep preserves the untouched portion during renaming. Do not describe Keep mode as neutral by assuming that every Inspector field remains active in every mode.
An expression can match part of a name. For example, right(.*) can affect names beyond those beginning with right; ^right(.*) restricts the start. The manual also shows alternatives such as (copy|right) and the inline (?i) case-insensitive modifier. Do not copy JavaScript /pattern/gi wrappers or unverified features from another engine.
Conflicts selects the input used for output Default/[Main]. The manual does not define it as a general replacement strategy for equally named AOVs. If both sets must survive, use distinct namespaces such as Left.pass.* and Right.pass.*, then verify that no resulting pass duplicates another.
Test at least a matching name, a nonmatching name, a similar name and a case variation. Then inspect the real output layer list: Tester helps validate the string rule, but it does not certify every source’s contents or the exported EXR.
When to use it
- Remove a known prefix from selected render passes while retaining other names.
- Separate two sources into Left/Right or Old/New layer namespaces.
- Remove temporary layers with a verifiable naming pattern.
- Retain only layers matching an explicit rule.
- Prepare names for LayerMuxer and inspect the list before export.
Article screenshots
Inputs & outputs
LayerRegex · layer connections
This is a multilayer image structure editor: an expression matches layer names, a mode chooses the action, and a template builds replacement names. Start with actual names and the built-in Tester. Renaming alone does not transform color, geometry or channel types.
LayerRegex applies an independent naming rule to each of two inputs. Transform renames, Keep retains matches and Remove deletes matches; Conflicts chooses the output Default/[Main].
Inputs
- Image 1
First multilayer source
Receives: First source; its names are processed by the independent Image 1 Inspector block.
Inside the node: LayerRegex applies an independent naming rule to each of two inputs. Transform renames, Keep retains matches and Remove deletes matches; Conflicts chooses the output Default/[Main].
Typical sources: Loader · LayerMuxer · LayerRegex · LayerRemover
This is an image stream that may contain named layers. This node has no separate Effect Mask input.
- Image 2
Second multilayer source
Receives: Second source with its own Expression, Mode, Name Template, Unmatched and Tester.
Inside the node: LayerRegex applies an independent naming rule to each of two inputs. Transform renames, Keep retains matches and Remove deletes matches; Conflicts chooses the output Default/[Main].
Typical sources: Loader · LayerMuxer · LayerRegex · LayerRemover
This is an image stream that may contain named layers. This node has no separate Effect Mask input.
Outputs and destination
Output
Image with renamed or filtered layer sets from the inputs; Conflicts selects Default/[Main].
Next step: LayerMuxer · LayerRegex · LayerRemover · Saver
A depth layer does not turn an image into a deep stream. Check exported layers separately.
- Output
- Image with renamed or filtered layer sets from the inputs; Conflicts selects Default/[Main].
Processing order
- Copy actual names from both sources and record the intended output names.
- Connect Image 1 and, when needed, an independent second source to Image 2.
- Set Expression in the correct input block and check matches in Tester.
- For renaming, choose Transform and set Name Template; Unmatched Keep retains other names.
- Choose Keep for a matching subset or Remove to delete matches. Inspect the active controls and final list, especially after a mode change.
- Repeat the validation independently for Image 2 and choose the intended Default/[Main] with Conflicts.
- Inspect the contents and alpha of retained layers, then verify a short export by reloading it.
Layer processing branch
LoaderA.Output → LayerRegex.Image1; LoaderB.Output → LayerRegex.Image2; LayerRegex.Output → Saver.Input
Loader must actually supply the multilayer source. Saver requires a suitable format and verification by reloading.
The node has 2 image input(s), one image output and no Effect Mask. Verify layer inventory and main picture separately.
Parameters
LayerRegex · Inspector reference
LayerRegex applies an independent naming rule to each of two inputs. Transform renames, Keep retains matches and Remove deletes matches; Conflicts chooses the output Default/[Main].
- Expression
- What matched the name
- Mode / Template
- Action on the match
- Unmatched
- Nonmatching names
- Output / Main
- Layers and main result
Image 1 / names · Match and replacement
Map actual first-source names through Expression and Name Template.
- Image 1
Image 1 / names > Image 1Independent rules for the first input. Expression, Mode, Name Template, Unmatched and Tester in this block apply only to Image 1. They do not affect Image 2, even when layer names are equal.
Check / distinguish: Start with the first source alone so that results from two rules are not confused.
- Image 1: Expression
Image 1 / names > Image 1: ExpressionName-matching pattern for Image 1. (.*) captures the complete name as group $1. Use ^render_(.*)$ for a render_ prefix: render_diffuse yields $1 = diffuse. The ^ and $ anchors constrain the start and end; the dot and asterisk have special meanings.
Check / distinguish: Test render_diffuse, diffuse and old_render_diffuse; the last must not match ^render_.
- Image 1: Name Template
Image 1 / names > Image 1: Name TemplateBuilds the new name in Transform mode. $1 is the first Expression group. Right.$1 adds text before the capture and $1.Right after it. With ^render_(.*)$, the $1 template removes render_. Different original names must not accidentally produce the same result.
Check / distinguish: Check both the new name and its uniqueness, not just whether a match occurred.
- Image 1: Tester
Image 1 / names > Image 1: TesterHelps inspect the expression and resulting name. Open Tester and check real strings: a match, a nonmatch, a similar name and a case variation. The block is collapsed in the original capture; expand it in the Inspector and evaluate your own names. Complement Tester with the actual layer list.
Check / distinguish: String validation does not verify pixels or the exported file.
Image 1 / action · Mode and nonmatches
Transform, Keep and Remove serve different purposes; inspect active fields after switching.
- Image 1: Mode
Image 1 / action > Image 1: ModeChooses renaming, matching-subset selection or removal. Transform changes matched names through Name Template. Keep retains the matching set; the manual’s example removes all others. Remove deletes matches. After changing modes, check the active auxiliary fields and the actual list.
Check / distinguish: Validate Mode against the layer list, not only the visible main picture.
- Image 1: Mode — Transform
Image 1 / action > Image 1: Mode — TransformTransforms matched names through Name Template. Parentheses in Expression create groups, while $1 and subsequent references insert them into the replacement name. (.*) + $1 is an identity transform; (.*) + Left.$1 adds a prefix. Unmatched controls names that do not match.
Check / distinguish: Verify one simple prefix before adding more complex transformations.
- Image 1: Mode — Keep
Image 1 / action > Image 1: Mode — KeepRetains layers matching Expression. Keep is a matching-name filter. The manual’s (copy|right) example explicitly retains matches and removes other layers. After selecting Keep, inspect the other active fields and the actual filtered set in the installed Inspector.
Check / distinguish: Before enabling it, list every name that must survive, including the required main picture.
- Image 1: Mode — Remove
Image 1 / action > Image 1: Mode — RemoveRemoves layers whose names match. Use a pattern such as ^tmp_(.*)$ to remove temporary layers after checking actual matches. (.*) covers the complete set, so one safe-looking test name is insufficient. For ordinary match removal, retain nonmatches where that choice is available.
Check / distinguish: Test at least one layer that must survive.
- Image 1: Unmatched
Image 1 / action > Image 1: UnmatchedControls names that do not match the expression. Keep retains nonmatches and Remove discards them. This matters especially in Transform: rename part of the set while preserving the rest, or isolate the transformed layers. Check the field’s availability in other modes in the actual Inspector.
Check / distinguish: Use Keep for the first renaming pass.
- Image 1: Unmatched — Keep
Image 1 / action > Image 1: Unmatched — KeepRetains nonmatching names during processing. In Transform, this choice passes untouched layers onward. For example, ^render_(.*)$ + $1 renames render_diffuse while utility.preview remains utility.preview. It cannot restore a layer already removed by another node or rule.
Check / distinguish: Use an actual nonmatching source name as a control test.
- Image 1: Unmatched — Remove
Image 1 / action > Image 1: Unmatched — RemoveDiscards layers that do not match Expression. With Transform, Remove isolates the transformed matches. A narrow or incorrect pattern can exclude the required main image and useful passes. Inspect the complete output name list after configuration.
Check / distinguish: First ensure that every required name really matches Expression.
Image 2 · Second-input rule
The second source has independent Expression, Mode, Template, Unmatched and Tester.
- Image 2
Image 2 > Image 2Independent rules for the second input. Image 2 has the same five control groups as Image 1. Leave the first source unchanged while prefixing only the second source’s names. An unconnected source cannot create layers from expression text.
Check / distinguish: Inspect the actual second-source names before copying the first block’s rule.
- Image 2: Expression
Image 2 > Image 2: ExpressionName-matching pattern for Image 2. Uses the same documented techniques: captures, the ^ anchor, alternatives and (?i). If the second source uses pass.diffuse, escape the literal dot in the search and verify it in Tester.
Check / distinguish: Do not assume that different renders use identical case or separators.
- Image 2: Mode
Image 2 > Image 2: ModeTransform, Keep or Remove for the second layer set. Transform renames second-source matches; Keep selects the matching set; Remove deletes matches. The selection does not change the first block’s Mode. With two inputs, inspect both lists before assessing their combination.
Check / distinguish: For comparing two versions, start with Transform and distinct prefixes.
- Image 2: Name Template
Image 2 > Image 2: Name TemplateReplacement-name template for Image 2 layers. For Expression ^(pass\..*)$, Right.$1 produces pass.diffuse → Right.pass.diffuse. Unmatched handles other names. Choose a prefix that reflects the branch and differs from Image 1.
Check / distinguish: Do not map all matching layers to one constant name.
- Image 2: Unmatched
Image 2 > Image 2: UnmatchedRetention or removal of second-input nonmatches. In Transform, Keep passes untouched Image 2 names and Remove isolates transformed matches. This is independent of Image 1. After changing Mode, check whether the field remains active.
Check / distinguish: Compare a control nonmatch from Image 2, not the first source.
- Image 2: Tester
Image 2 > Image 2: TesterTests the second input’s rule. The second block’s Tester uses that block’s expression and template. A working Image 1 test does not validate Image 2. After testing strings, inspect real output layers with both branch prefixes.
Check / distinguish: Keep a separate set of test names for each input.
Default / [Main] · Main layer
Conflicts selects the main picture; other names must be checked for uniqueness separately.
- Conflicts
Default / [Main] > ConflictsChooses which input supplies result Default/[Main]. Use Image 1 and Use Image 2 switch the output main layer. This control does not replace checking duplicate result names and is not documented as a universal winner selection for each AOV collision.
Check / distinguish: Make different sources’ names distinct before combining.
- Conflicts — Use Image 1
Default / [Main] > Conflicts — Use Image 1Uses Image 1 for output Default/[Main]. Choose the first source when its main picture must remain the result’s base. Then independently check that both rules retain the intended layers without ambiguous names.
Check / distinguish: Compare the main picture and alpha with Image 1.
- Conflicts — Use Image 2
Default / [Main] > Conflicts — Use Image 2Uses Image 2 for output Default/[Main]. Choose the second source for the result’s main picture. Switching alone does not prove replacement of a specific depth, ID or other equally named layer; inspect that layer’s contents separately.
Check / distinguish: Check that the intended second-input main image has not been excluded by the filter.
Regex checks & settings · Expression checks and Settings
Verify syntax in Fusion and document the rule.
- Anchors and literal separators
Controls > Expression^ anchors the start and $ the end. Use \. for a literal dot and verify it in Tester. For example, ^render_(.*)$ must not affect old_render_diffuse.
Check / distinguish: Test a similar name with the target text in the middle.
- Case-insensitive match
Controls > Expression > (?i)The manual shows (?i) as an inline case-insensitive modifier. Enter an expression in Fusion, not a JavaScript /pattern/gi wrapper.
Check / distinguish: Test right, Right and RIGHT; case folding does not correct misspellings.
- Capture substitutions
Controls > Name TemplateExpression parentheses create capture groups; Name Template uses $1, $2 and subsequent references. Text before or after a reference adds a prefix or suffix.
Check / distinguish: Map each reference to its capture and intended result.
- Uniqueness after Transform
Output > layer namesDifferent source names may become identical after prefix removal. Conflicts does not replace validation of that case.
Check / distinguish: For two versions, use distinct namespaces and inspect both layers.
- Keep mode and Unmatched
Controls > Mode / UnmatchedThe manual defines Keep as retaining the matched set while removing the rest. Unmatched is especially relevant to Transform; do not assume all control combinations remain equally active.
Check / distinguish: After changing Mode, inspect field availability and the complete filtered result.
- Hide Incoming Connections
Settings > Hide Incoming ConnectionsHides selected incoming Flow lines while the node is not selected. Connections and data remain; the lines reappear when selecting the node.
Check / distinguish: Select the node to inspect dependencies; a hidden line does not mean an absent source.
- Comments
CommentsA comment documents processing intent and expected layer names. It does not change pixels or the layer list.
Check / distinguish: Record the main-picture source and required output layers.
- Scripting
ScriptingShared scripting fields attach actions to rendering stages. Ordinary layer selection, renaming and removal do not require scripts.
Check / distinguish: Leave callbacks empty unless automation is part of the task.
Before adjusting the node
- Image 1 and Image 2 rules were tested independently on actual names.
- $1 references the intended capture and replacement names remain unique.
- Keep mode is treated as a matching subset; Remove is not used with an unverified broad pattern.
- Tester covers a match, nonmatch, similar name and case variation.
- Conflicts is set for Default/[Main]; output layers and alpha were checked after filtering.
Reference documentation
- Blackmagic Design · DaVinci Resolve 21 Reference Manual · Fusion Layer Nodes · Layer Regex
Fusion Layer Nodes · Layer Regex, starting on page 2490. Control labels are cross-checked with the original screenshots in this article.
Examples
Remove render_ while retaining other layers
Rename a known prefix without affecting the utility.preview control layer.
Starting conditions
DaVinci Resolve / Fusion Studio · LayerRegex 21 · editorial reference 2026-10-17 · The edition and loader must support the actual EXR layer set; inspect the installed version. · Target OS is not fixed; native execution is pending.
1920 × 1080 · 24 fps · 96 frames · Image with named layers; Flow type image. This is neither a deep conversion nor a color conversion.
- Your EXR files with known names, contents and a main picture; media files are not included in the exercise.
- Loader must load the actual layer set. On the Resolve Fusion page Saver writes OpenEXR; inspect the corresponding format settings in Fusion Studio.
- Layer inventory, alpha, contextual controls and a short write/reload test must be checked in the native application.
Source material
- A
Your EXR with render_diffuse, render_specular and utility.preview layers plus a verified main picture.
These names form an illustrative fixture. If your file uses different names, adapt the rule and every expected result consistently.
Nodes and connections
A— Original named layers · LoaderTOOL— LayerRegex · Image 1 rule · LayerRegexOUT— Saver · test EXR · Saver
| Source | Destination | Data |
|---|---|---|
Original named layers (A)Output | LayerRegex · Image 1 rule (TOOL)Image1 | image |
LayerRegex · Image 1 rule (TOOL)Output | Saver · test EXR (OUT)Input | image |
Graph output: Saver · test EXR (OUT)
Parameter values
- LayerRegex · Image 1 rule (TOOL) / Controls / Image 1 / Expression
"^render_(.*)$"Anchor the start and capture the useful name portion as $1.
- LayerRegex · Image 1 rule (TOOL) / Controls / Image 1 / Mode
"Transform"Rename matches.
- LayerRegex · Image 1 rule (TOOL) / Controls / Image 1 / Name Template
"$1"Keep only the captured name after render_.
- LayerRegex · Image 1 rule (TOOL) / Controls / Image 1 / Unmatched
"Keep"Retain utility.preview and other nonmatches.
- LayerRegex · Image 1 rule (TOOL) / Controls / Conflicts
"Use Image 1"Choose the first source’s main result.
- Saver · test EXR (OUT) / File / Save Layers
"All Layers"Request the output layer set from Saver; source/format support and Channels options must also be checked.
Reproduce the example
- Record the intended mapping: render_diffuse → diffuse, render_specular → specular, utility.preview → utility.preview.
A mapping table makes success verifiable before processing.
Check: The source has no existing diffuse or specular names that would become duplicates.
- Connect Loader, LayerRegex and Saver. Set the Image 1 expression, Transform, template and Unmatched.
The first-input rule is independent of unused Image 2.
Check: The Image 1 block is configured; $1 corresponds to the Expression capture.
- Test render_diffuse, utility.preview and old_render_diffuse in Tester.
The last name contains a similar middle fragment and tests the ^ anchor.
Check: Only render_diffuse becomes diffuse; both control names remain unchanged with Unmatched Keep.
- Open the output list, then view diffuse, specular and utility.preview individually.
Renaming must not change data meaning or hide a useful layer.
Check: Names match the table; layer contents and alpha can be compared with their sources.
- Configure Saver for a short EXR sequence, write a test and reload it.
Saving options may omit layers even when the Flow carries them correctly.
Check: The reloaded file contains the intended names, main-layer contents and alpha.
Expected result
- LayerRegex · Image 1 rule (TOOL) · frame 48
render_diffuse and render_specular become diffuse and specular; utility.preview retains its name.
Alpha: Compare each layer’s before/after alpha. Renaming does not convert channels or color space.
When the result differs
- Layers receive an unexpected literal or empty name fragment.
Cause: Name Template does not correspond to the Expression capture groups.
Correction: Verify ^render_(.*)$ and $1 in Tester with one actual name.
- utility.preview disappeared.
Cause: Unmatched is Remove or a filtering Mode is active.
Correction: Restore Transform and Unmatched Keep, then inspect the complete list.
- Layers exist in the Flow but fewer are present in the saved file.
Cause: Saver writes only the selected main image or a restricted channel/layer set.
Correction: Check Save Layers, the format and Channels, then repeat a short write/reload test.
References
- Blackmagic Design — Fusion 20.3 Reference Manual
Fusion Fundamentals: getting clips into Fusion; MediaIn/MediaOut roles; Loader/Saver and manual EXR disk-cache workflow. Current Resolve 21.1 live UI validation remains separate.
- Blackmagic Design · DaVinci Resolve 21 Reference Manual · LayerRegex
Chapter 106, Layer Nodes, printed pp.2490–2493; common controls 2500–2501. Documented image connectors, layer controls and shared Settings. Article port IDs are semantic and are not a native API-ID certification.
Separate two sets with Left and Right prefixes
Retain two versions of equally named passes by processing Image 1 and Image 2 independently.
Starting conditions
DaVinci Resolve / Fusion Studio · LayerRegex 21 · editorial reference 2026-10-17 · The edition and loader must support the actual EXR layer set; inspect the installed version. · Target OS is not fixed; native execution is pending.
1920 × 1080 · 24 fps · 96 frames · Image with named layers; Flow type image. This is neither a deep conversion nor a color conversion.
- Your EXR files with known names, contents and a main picture; media files are not included in the exercise.
- Loader must load the actual layer set. On the Resolve Fusion page Saver writes OpenEXR; inspect the corresponding format settings in Fusion Studio.
- Layer inventory, alpha, contextual controls and a short write/reload test must be checked in the native application.
Source material
- A
First EXR with a main picture and named pass.diffuse and pass.specular layers.
Prepare your own fixture with visibly distinct left and right versions.
- B
Second EXR with the same pass.diffuse and pass.specular names but distinguishable contents.
Actual layers are renamed, not the Loader node labels in the Flow.
Nodes and connections
A— Left pass version · LoaderB— Right pass version · LoaderTOOL— LayerRegex · two namespaces · LayerRegexOUT— Saver · test EXR · Saver
| Source | Destination | Data |
|---|---|---|
Left pass version (A)Output | LayerRegex · two namespaces (TOOL)Image1 | image |
Right pass version (B)Output | LayerRegex · two namespaces (TOOL)Image2 | image |
LayerRegex · two namespaces (TOOL)Output | Saver · test EXR (OUT)Input | image |
Graph output: Saver · test EXR (OUT)
Parameter values
- LayerRegex · two namespaces (TOOL) / Controls / Image 1 / Expression
"^(pass\\..*)$"Capture names with the literal pass. prefix.
- LayerRegex · two namespaces (TOOL) / Controls / Image 1 / Mode
"Transform"Rename the first set.
- LayerRegex · two namespaces (TOOL) / Controls / Image 1 / Name Template
"Left.$1"Add a distinct namespace for A.
- LayerRegex · two namespaces (TOOL) / Controls / Image 1 / Unmatched
"Keep"Retain the main picture and untouched first-input names.
- LayerRegex · two namespaces (TOOL) / Controls / Image 2 / Expression
"^(pass\\..*)$"Independently match the same name family on the second input.
- LayerRegex · two namespaces (TOOL) / Controls / Image 2 / Mode
"Transform"Rename the second set.
- LayerRegex · two namespaces (TOOL) / Controls / Image 2 / Name Template
"Right.$1"Retain the second set under a distinct prefix.
- LayerRegex · two namespaces (TOOL) / Controls / Image 2 / Unmatched
"Keep"Retain second-input nonmatches; inspect any other duplicate names separately.
- LayerRegex · two namespaces (TOOL) / Controls / Conflicts
"Use Image 1"Choose A for Default/[Main] independently of pass names.
- Saver · test EXR (OUT) / File / Save Layers
"All Layers"Request the output layer set from Saver; source/format support and Channels options must also be checked.
Reproduce the example
- Connect A and B and verify that both contain pass.diffuse and pass.specular.
Both data versions must survive rather than relying on an assumed duplicate-name winner.
Check: The equally named source layers have distinguishable contents.
- In Image 1, set Transform, ^(pass\..*)$, Left.$1 and Unmatched Keep.
The left set receives its own prefix, while the main picture does not match the pass. pattern.
Check: Tester converts pass.diffuse to Left.pass.diffuse.
- Configure Image 2 separately with Right.$1 and the same expression; check its Tester.
First-block settings do not automatically apply to the second input.
Check: pass.diffuse becomes Right.pass.diffuse only for B.
- Choose Use Image 1 and inspect all four renamed passes against A and B.
Conflicts selects Main; checking prefixes confirms that both versions survive.
Check: Left.pass.diffuse/specular and Right.pass.diffuse/specular are distinct and contain their corresponding source data.
- Configure Saver for a short EXR sequence, write a test and reload it.
Saving options may omit layers even when the Flow carries them correctly.
Check: The reloaded file contains the intended names, main-layer contents and alpha.
Expected result
- LayerRegex · two namespaces (TOOL) · frame 48
Four named passes survive with Left and Right prefixes; Default/[Main] is selected from A.
Alpha: Compare each version’s alpha with its own source; renaming does not create stereo alignment or source contents.
When the result differs
- One set retains its original names.
Cause: Only one input is configured or the second block’s expression does not match.
Correction: Open the corresponding Tester and check the actual name, case and literal dot.
- Ambiguous names remain after renaming.
Cause: Other nonmatching names are equal in A and B.
Correction: Expand the rule deliberately or reduce the inputs beforehand; do not rely on a general Conflicts priority.
- Layers exist in the Flow but fewer are present in the saved file.
Cause: Saver writes only the selected main image or a restricted channel/layer set.
Correction: Check Save Layers, the format and Channels, then repeat a short write/reload test.
References
- Blackmagic Design — Fusion 20.3 Reference Manual
Fusion Fundamentals: getting clips into Fusion; MediaIn/MediaOut roles; Loader/Saver and manual EXR disk-cache workflow. Current Resolve 21.1 live UI validation remains separate.
- Blackmagic Design · DaVinci Resolve 21 Reference Manual · LayerRegex
Chapter 106, Layer Nodes, printed pp.2490–2493; common controls 2500–2501. Documented image connectors, layer controls and shared Settings. Article port IDs are semantic and are not a native API-ID certification.
Remove only temporary tmp_ layers
Remove tmp_preview and tmp_debug while retaining diffuse and the similar old_tmp_note name.
Starting conditions
DaVinci Resolve / Fusion Studio · LayerRegex 21 · editorial reference 2026-10-17 · The edition and loader must support the actual EXR layer set; inspect the installed version. · Target OS is not fixed; native execution is pending.
1920 × 1080 · 24 fps · 96 frames · Image with named layers; Flow type image. This is neither a deep conversion nor a color conversion.
- Your EXR files with known names, contents and a main picture; media files are not included in the exercise.
- Loader must load the actual layer set. On the Resolve Fusion page Saver writes OpenEXR; inspect the corresponding format settings in Fusion Studio.
- Layer inventory, alpha, contextual controls and a short write/reload test must be checked in the native application.
Source material
- A
EXR with a main picture and tmp_preview, tmp_debug, diffuse and old_tmp_note layers.
Substitute actual names if necessary while keeping at least one match and one similar nonmatch.
Nodes and connections
A— Original named layers · LoaderTOOL— LayerRegex · Image 1 rule · LayerRegexOUT— Saver · test EXR · Saver
| Source | Destination | Data |
|---|---|---|
Original named layers (A)Output | LayerRegex · Image 1 rule (TOOL)Image1 | image |
LayerRegex · Image 1 rule (TOOL)Output | Saver · test EXR (OUT)Input | image |
Graph output: Saver · test EXR (OUT)
Parameter values
- LayerRegex · Image 1 rule (TOOL) / Controls / Image 1 / Expression
"^tmp_(.*)$"Restrict removal to the exact starting prefix.
- LayerRegex · Image 1 rule (TOOL) / Controls / Image 1 / Mode
"Remove"Remove matching layers.
- LayerRegex · Image 1 rule (TOOL) / Controls / Image 1 / Unmatched
"Keep"Retain nonmatches where the field is active; confirm the actual Remove result.
- LayerRegex · Image 1 rule (TOOL) / Controls / Conflicts
"Use Image 1"A supplies the main picture; its required name must not match tmp_*.
- Saver · test EXR (OUT) / File / Save Layers
"All Layers"Request the output layer set from Saver; source/format support and Channels options must also be checked.
Reproduce the example
- Inspect the input and write two groups: remove tmp_preview/tmp_debug; retain diffuse/old_tmp_note and the main layer.
A similar control name reveals overly broad matching.
Check: The main layer does not match ^tmp_.
- Set the expression and test all four names before enabling removal.
Without ^, the pattern can affect tmp_ in the middle of a name.
Check: Only tmp_preview and tmp_debug match.
- Connect the branch and choose Remove; inspect Unmatched and retain nonmatches.
The action must remove only verified matches.
Check: The output includes diffuse and old_tmp_note; tmp_preview and tmp_debug are absent.
- View retained layers and the main picture after LayerRegex.
The list verifies name selection; content comparison checks the required result.
Check: The main picture, diffuse and their alpha retain the expected contents.
- Configure Saver for a short EXR sequence, write a test and reload it.
Saving options may omit layers even when the Flow carries them correctly.
Check: The reloaded file contains the intended names, main-layer contents and alpha.
Expected result
- LayerRegex · Image 1 rule (TOOL) · frame 48
The two tmp_ layers are removed; diffuse, old_tmp_note and the source main layer remain.
Alpha: Compare retained main-layer alpha with the input; removing a layer is not a pixel mask.
When the result differs
- old_tmp_note was removed.
Cause: The pattern is not anchored to the start or was authored incorrectly.
Correction: Use ^tmp_(.*)$ and retest the similar name in Tester.
- The output set is nearly empty.
Cause: A broad pattern, Keep instead of Remove or removal of nonmatches is active.
Correction: Restore the control list, check Mode and active fields, then enable removal again.
- Layers exist in the Flow but fewer are present in the saved file.
Cause: Saver writes only the selected main image or a restricted channel/layer set.
Correction: Check Save Layers, the format and Channels, then repeat a short write/reload test.
References
- Blackmagic Design — Fusion 20.3 Reference Manual
Fusion Fundamentals: getting clips into Fusion; MediaIn/MediaOut roles; Loader/Saver and manual EXR disk-cache workflow. Current Resolve 21.1 live UI validation remains separate.
- Blackmagic Design · DaVinci Resolve 21 Reference Manual · LayerRegex
Chapter 106, Layer Nodes, printed pp.2490–2493; common controls 2500–2501. Documented image connectors, layer controls and shared Settings. Article port IDs are semantic and are not a native API-ID certification.
Other outlines from the article
Remove render_ while retaining other layers
Rename a known prefix without affecting the utility.preview control layer.
- Loader
- LayerRegex
- Saver
Separate two sets with Left and Right prefixes
Retain two versions of equally named passes by processing Image 1 and Image 2 independently.
- Loader A + Loader B
- LayerRegex
- Saver
Remove only temporary tmp_ layers
Remove tmp_preview and tmp_debug while retaining diffuse and the similar old_tmp_note name.
- Loader
- LayerRegex
- Saver
Mistakes
- Using Remove with (.*), thereby deleting the entire matched set.
- Treating Keep mode as neutral regardless of Unmatched.
- Using $1 without creating the intended group in Expression.
- Omitting ^ and changing a name that contains the target text in the middle.
- Copying JavaScript /pattern/gi syntax instead of a verified Fusion expression.
- Mapping different names to one duplicate and expecting Conflicts to resolve every AOV collision.
- Editing Image 1 while forgetting that Image 2 has an independent rule.
Tips
- Write a table of 4–6 actual names and expected results before authoring Expression.
- Retain nonmatching layers during the first Transform pass; introduce strict filtering after verification.
- Use ^ for a precise prefix; use $ too when matching an entire name.
- A dot in an expression matches any character; escape a literal dot and verify it in Tester.
- Distinct input prefixes help retain both versions of a layer for comparison.
- Renaming depth to normal does not convert depth into normals; its meaning and values remain unchanged.
Workflow order
- Copy actual names from both sources and record the intended output names.
- Connect Image 1 and, when needed, an independent second source to Image 2.
- Set Expression in the correct input block and check matches in Tester.
- For renaming, choose Transform and set Name Template; Unmatched Keep retains other names.
- Choose Keep for a matching subset or Remove to delete matches. Inspect the active controls and final list, especially after a mode change.
- Repeat the validation independently for Image 2 and choose the intended Default/[Main] with Conflicts.
- Inspect the contents and alpha of retained layers, then verify a short export by reloading it.
