# Cloning

## Clone and Precomp

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw7nw2z6xNvSh8ug7z%2FIcons-A_17.png?alt=media&#x26;token=133abd2c-2b8d-45df-953a-07175890d9ff" alt=""></div>

Clones layers using linked expressions and precomps the cloned layers (Win: Ctrl+Alt+Shift+W, Mac: macControl+W).

![Precomp Clone Effect](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MS7UciN5Xf92cLqxdjg%2F-MS7ZA5f9qGhFJteSU57%2FClones-Interface.jpg?alt=media\&token=1b199cbb-73cb-4175-841d-a1589dc55fd8)

You can make use of a *Precomp Clone* when you, for example, need to merge layers into one layer to add effects directly to the precomp, or to have the precomp layer fit to comp size to be able to reference it by another layer's effect. The advantage of using *Clone and Precomp* instead of simply precomping is that you keep all layers within your main comp. That way, you can still work with all layers in your main comp, set parents within that comp, and reference layers in effects without the confusion of working within several comps. Also, it's much easier to see the whole project structure if you mostly work in one comp.

Parented layers and layers, referenced by effects, will be cloned and precomped as well. If enabled, the active camera, as well as lights, will be cloned, too.

{% hint style="warning" %}
Make sure that all contained source layers, as well as your current comp, have unique names. Otherwise, the expressions on the clone layers cannot reference the correct source layers.
{% endhint %}

### Refreshing Layer and Comp Attributes <a href="#refreshing-layer-attributes" id="refreshing-layer-attributes"></a>

All linkable attributes are linked by expressions within the clone comp. Besides all transform and effects properties, you can disable/enable layers and effects themselves too and they will be live-disabled/enabled in the clone comp.

If you change non-linkable attributes (like adding an effect/mask, changing layer/effects/masks order, set another blending mode, etc.), you need to use [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections) or [Quick Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#quick-refresh-connections-experimental) (or the even simpler and faster [Quick Refresh Clone Connections within Refresh Layout](https://workflower.constantin-maier.com/main-functions/layout#quick-refresh-clone-connections-of-selected-layers)) afterward to update the corresponding clone layer.

Similarly, to update comp attributes (like a new size or length), you'll need to execute *Refresh Connections* or *Quick Refresh Connections*. Please be aware that certain comp attributes unfortunately can't be updated, like *Shadow Map Resolution* of the *Classic 3D* renderer, or *Render Quality* of the *Advanced 3D* renderer. To change those, please go into the clone comp and change the properties yourself.

{% hint style="info" %}
If you encounter a bug with either *Refresh Connections* or *Quick Refresh Connections*, you might want to try the other function instead as it will often solve the issue.
{% endhint %}

{% hint style="warning" %}
Sometimes it may happen that expression errors come up directly after creating a *Precomp Clone* or when refreshing a *Precomp Clone*. Most of the time, simply executing *Refresh Connections* on the *Precomp Clone* will resolve these issues.

Check out the [Expression Errors](https://workflower.constantin-maier.com/known-bugs#expression-errors) section of [Known Bugs](https://workflower.constantin-maier.com/known-bugs#clone-and-precomp-bugs) for more information.
{% endhint %}

### Duplicating a Precomp Clone

#### Duplicate & Create Unique Precomp Clone

When you duplicate a *Precomp Clone* and hit *Refresh Connections*, a unique clone comp will be created for the duplicated clone, so that there will be two *Precomp Clones* then.

As of [version 1.1](https://workflower.constantin-maier.com/releases#1-1), you may also select the *Precomp Clone* **as well as** all contained layers and execute [Duplicate Layer / Clone / Group](https://workflower.constantin-maier.com/group-functions/create-and-duplicate-groups#duplicate-group). This will duplicate the *Precomp Clone* as well as all layers and create a unique new clone comp for the duplicated layers.

#### Duplicate & Create Dependent Precomp Clone

![Dependent Clones, as indicated by the ｄ Icon that were duplicated from 'BUILDING 3D || Group Clone'](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-renzdhlsnTRBz9_O%2F-MU-ta-smW_0e-ds2KOM%2FClones---Dependent.jpg?alt=media\&token=58c575cf-212a-44d7-9845-4e26bbd89ee9)

If you simply want to reference the original clone comp, you need to delete the *Settings* effect as well as the *Cloned Layer* effects on the duplicated Precomp Clone to make it dependent on the original clone comp.&#x20;

As of [version 1.1](https://workflower.constantin-maier.com/releases#1-1), you can also just select the *Precomp Clone* layer and execute [Duplicate Layer / Clone Group](https://workflower.constantin-maier.com/group-functions/create-and-duplicate-groups#duplicate-group). This will duplicate the *Precomp Clone* and remove the *Settings* and *Cloned Layer* effects to make it a *Dependent Clone*.

### Duplicating a Comp containing Precomp Clones

When you want to duplicate a comp that contains Precomp Clones, it's recommended to select the comp as project panel item and execute [Duplicate Layer / Clone / Group](https://workflower.constantin-maier.com/group-functions/create-and-duplicate-groups#duplicate-group). (Function available as of [version 2.0.4](https://workflower.constantin-maier.com/releases#id-2-0-4).)

This will duplicate the comp, make all duplicated *Precomp Clones* independent from the original clone comps and update all *Dependent Clones* in the duplicated comp to the new clone comps.

### Using a Precomp Clone in another Comp

#### Using a Unique Precomp Clone in another Comp

If you want to create a unique *Precomp Clone* from your *Precomp Clone* in your new comp, you will face a problem:

When copying the *Precomp Clone* as well as the contained layers into your clipboard and pasting them to the new comp, After Effects will **not** have retained references in the layer dropdowns of all effects, including the clone layer dropdowns on the *Precomp Clone*, hence the *Precomp Clone* doesn't have any referenced clone layers anymore.

To get around this issue, please do this (possible as of [version 2.0.4](https://workflower.constantin-maier.com/releases#id-2-0-4)):

1. Select the *Precomp Clone* as well as all contained layers. (In case you want to copy a *Group Clone*, simply select the group header.)
2. Execute [Store Layers](https://workflower.constantin-maier.com/storing-layers#store-layers). (This will store the layers or group in one of *Workflower's Store Comps*.)
3. Go to your new comp and execute [Paste Stored Layers](https://workflower.constantin-maier.com/storing-layers#paste-stored-layers). (This will paste the layers/group with all effect layer dropdowns retained. Additionally, it will make the duplicated *Precomp Clone* independent from the original clone comp and update all *Dependent Clones* in the new comp to the new clone comps.)

#### Using a Dependent Clone in another Comp

When you want to use a Dependent Clone in another comp, you can simply drag the precomp item from the project panel into your new comp and execute [Refresh Layout](https://workflower.constantin-maier.com/main-functions/layout#refresh-layout). *Workflower* will immediately recognize the layer as a *Dependent Clone*.

You may also simply copy a *Dependent Clone* layer from your original comp into your clipboard and paste it into your new comp.

### Adding / Removing Clone Layers

![Add/Remove Layers by Duplicating/Removing the Cloned Layer Effect](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-renzdhlsnTRBz9_O%2F-MU-tFCF0px4BAb02jeP%2FClones---Dropdown.jpg?alt=media\&token=cdfc7719-db1c-44e2-83fa-fa146845994b)

You can add new clone layers to the *Precomp Clone* by duplicating a *Cloned Layer* effect on the *Precomp Clone* layer, and then selecting a new layer by using the layer dropdown. You can remove a clone layer by deleting its *Cloned Layer* effect.

There's the option of using the [Add / Remove Layer References](https://workflower.constantin-maier.com/miscellaneous-layer-functions#add-remove-layer-references) function as well to add or remove clone layers which generally is a bit faster than selecting layers via the dropdown.

### Unlink Properties

![An Unlinked Precomp Clone, as indicated by the  ：Ｕ  ： Icon](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-VbPN37vPTKqLO-3N%2F-MU-VmwVBJZG293QmpTQ%2FClones---Unlinked.jpg?alt=media\&token=7b5dd67f-a8ff-438b-be75-eca82f77fa21)

By default, all clone layer properties are linked to their corresponding source layer properties. You can also, however, unlink all properties by unchecking *Link Properties via Expressions*. Expressions generally use up quite some computing power and if you work with a lot of *Precomp Clones*, this can significantly slow down your comp. That's why it might be useful to unlink properties after you're done working with your clone layers. When you get back to working on the clone, you can link properties again.

You can also use [Link / Unlink Properties](https://workflower.constantin-maier.com/main-functions/connections#link-unlink-properties) to link/unlink in a quicker way than (un)checking the checkbox. You can also link/unlink all properties within the whole comp or project at once using *Link / Unlink Properties*.

### Prime Clone

![Prime Clone with its contained Source Layers set to 0% Opacity](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-fGlCkpn5afZql5na%2F-MU-l4DtggdLjV7tcdbc%2FClones---Prime-Clone.jpg?alt=media\&token=1b1638e0-3ef6-45e8-8bd3-9884d3a7ff07)

A *Prime Clone* differs from a regular *Precomp Clone* insofar that the opacity of all contained source layers will be set to 0% while their corresponding clone layers in the clone comp retain their normal opacity and the *Prime Clone* precomp layer itself is the only layer left visible in the main comp. Basically, a *Prime Clone* is like a regular precomp, yet you don't lose all layers within the main comp, and you can manipulate the precomp layer while still being able to work on the contained layers - add effects, masks, change transforms, etc. - and see the result live on the precomp layer.

#### Opacity of Prime Clone Source Layers

![Prime Clone Source Layer Opacity Slider](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MTow0v61eybBdW9czUx%2F-MTozEF8MIJCua_nY7aT%2FClones---Prime-Clone-Opacity.jpg?alt=media\&token=cd556e2e-02cb-475c-b13a-f50b59984988)

Because the opacity of all contained layers is set to 0%, AE's opacity slider is not usable anymore. That's why *Workflower* will add an effect to the layer with a custom opacity slider. Use this one to modify the layer's opacity. Since hitting *T* won't work anymore to reveal the opacity slider in the timeline, you can also execute [Reveal Layer Opacity](https://workflower.constantin-maier.com/miscellaneous-layer-functions#reveal-layer-opacity) by using a shortcut to reveal *Workflower's* opacity slider.

True 3D objects in AE's *Advanced 3D* renderer cannot contain effects. That's why *Workflower* **cannot** add a custom opacity slider effect to those layers. So in case true 3D objects are within a *Prime Clone*, you can control the individual opacity of those layers by going to the corresponding effect on the *Precomp Clone* layer and modifying the [Custom States' *Clone Opacity*](#custom-clone-layer-states).

#### Working on Prime Clone Source Layers

![Prime Clone showing its Layers, as indicated by the » Icon Marker](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-fGlCkpn5afZql5na%2F-MU-lH9ElighgNAxBfyo%2FClones---Prime-Clone-Showing.jpg?alt=media\&token=0853f3f0-f03a-4fa4-a9d4-7bdaa5d592c6)

Because the only layer visible is the *Prime Clone* precomp layer, not its source layers, you can see changes instantly when you change properties linked by expressions.

However, when you, for example, add effects or change the layer order, you always need to execute [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections). (Most of the time, just executing [Refresh Layout](https://workflower.constantin-maier.com/main-functions/layout#refresh-layout) and its built-in *Quick Refresh Clone Connections* should work, too.) Refreshing can be useful when making minor changes, however, when you have to work quite a lot on the *Prime Clone* layers, you can also show the source layers themselves by either clicking on *Show Layers* on the *Precomp Clone* effect (and then executing *Refresh Layout*) or just hitting [Show Clone Layers](#show-clone-layers). The *Prime Clone* precomp layer will then become invisible and the opacity of all source layers will be set to their actual value.

Working with clone layers shown is computationally faster since the properties don't have to processed through expressions. When you're done working on your layers, hit *Show Clone Layers* again to hide them and show the *Prime Clone* precomp layer again.

#### Soloing Prime Clone Source Layers

You can solo *Prime Clone* source layers and they will be live-soloed in the clone comp. (This won't work on regular *Precomp Clones*.) However, be aware that the *Prime Clone* layer needs to be soloed as well for this to work. Instead of always having to solo the *Prime Clone* layer as well, you can just solo your desired source layers, hit *Refresh Layout* and if they are contained in a *Prime Clone*, the *Prime Clone* layer will be soloed automatically. If only the *Prime Clone* layer and no contained layers are soloed, all clone layers will be visible.

#### Stacking Prime Clones

![Prime Clones stacked on Top of each other](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MSnBBbDNDpxcj7DPPIJ%2F-MSnJs5CT21NPcc13PlL%2FClones---Prime-Clone-Layers.jpg?alt=media\&token=031ad1b9-677f-46c9-9d8d-7702157f7d30)

*Prime Clone* source layers are symbolized by the Icon • and they indent further depending on their *Prime Clone* depth level. That way you can create *Prime Clones* of *Prime Clones* and keep merging layers into precomps, while retaining a clear visual representation of the layer/precomp structure.

#### Using a Custom Prime Clone Renderer

As of [version 2.0.1](https://workflower.constantin-maier.com/releases#id-2-0-1), after having created a *Prime Clone* containing *Advanced 3D* objects, you can change your main comp's renderer from *Advanced 3D* to *Classic 3D.* When you execute [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections) on a clone that contains *Advanced 3D* objects, the clone's renderer will be always set to *Advanced 3D* regardless of the source comp's renderer.

Working in *Classic 3D* in your main comp while the clone comp is in *Advanced 3D*, enables you to work with proper 3D objects while being able to use blend modes, track mattes, etc. on non-*Advanced 3D* layers. (Otherwise, these features are disabled in the *Advanced 3D* renderer.)

### Group Clone

![A Group Clone, as indicated by the  \[ｇ\]  Icon, containing another Group Clone](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-R3gyKdzkOGLVNsKh%2F-MU-V612w5kiEJcjXlvJ%2FClones---Group-Clone.jpg?alt=media\&token=a291b708-fb40-455f-98a5-8973ecb846cd)

You can create a *Group Clone* by selecting the group header and then executing *Clone and Precomp*. A *Group Clone* differs from a normal *Precomp Clone* insofar that, when executing [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections), group layers will be automatically added/removed to/from the Group Clone if they have been added/removed to/from the group.

Only layers below the *Group Clone* layer will be added to the clone comp. That allows you, for example, to add a track matte or other manipulations onto the *Group Clone* without these layers being added to the clone. The only exception to this is when the *Group Clone* is a track matte to another layer. In that case, the layer below the *Group Clone* won't be added to the clone comp.

You can create *Group Clones* of groups within another *Group Clone* too. Only the *Group Clone* itself (not its contained layers) will be then added to the higher *Group Clone*.

{% hint style="info" %}
Because of its nature, you cannot add/remove layers to/from the *Group Clone* itself or use a *Custom Layer Order*.
{% endhint %}

#### Order of Group Clones, Group Mattes, and Group Linked Adjustment Layers

*Group Clones, Group Mattes,* and *Group Linked Adjustment Layers* have a specific layer order when used in conjunction. Read up [here](https://workflower.constantin-maier.com/group-functions/miscellaneous-group-functions#order-of-group-clones-group-mattes-and-group-linked-adjustment-layers) for more information.

### Downwards Clone

**(Added in** [**version 2.5**](https://workflower.constantin-maier.com/releases#id-2-5)**)**

<figure><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2F5PDyRVZw44QuqxhTe4zR%2FScreenshot%202024-09-22%20at%2012.12.44.png?alt=media&#x26;token=f945270d-89f7-4aab-8794-20a3540957e6" alt="" width="331"><figcaption><p>A Downwards Clone, as indicated by the [w] Icon</p></figcaption></figure>

A *Downwards Clone* grabs all layers in comp downwards from the *Precomp Clone* layer.

To use a *Downwards Clone*, select the first layer (needs a single layer selected), then execute *Clone and Precomp* and check *Create Downwards Clone*.

A *Downwards Clone* is similar to a [Group Clone](#group-clone) insofar as it always updates the source layers to be included upon execting [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections).

{% hint style="warning" %}
Because of its nature, you cannot add/remove layers to/from the *Downwards Clone* itself or use a *Custom Layer Order*.

Additionally, it's not possible to use a *Downwards Clone* with *Custom Size* or *Enabled Precomp Transforms*.
{% endhint %}

#### Stop Before Next Downwards Clone

<div align="center" data-full-width="false"><figure><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2FvEb6qqgDXrpvEOgTca4i%2FScreenshot%202024-09-22%20at%2012.30.19.png?alt=media&#x26;token=a37cb190-c641-4fb0-bac2-eaf6fd268cfb" alt="" width="329"><figcaption><p>Downwards Clone stopping before next, indicated by [ws]</p></figcaption></figure></div>

By default, a *Downwards Clone* will grab all layers downwards the comp. However, when you enable *Stop Before Next Downwards Clone* (on the *Clone and Precomp* dialog or on the settings effect), the *Downwards Clone* will only grab all layers until right before the next *Downwards Clone*.

### Custom Layer Order

![Precomp Clone Layers with a Custom Order](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MSnVVLlhJ5foNZp8Jdt%2F-MSnZ6cFo2gOF5G6OQ9V%2FClones---Custom-Order.jpg?alt=media\&token=3d5236a1-a436-404f-a42d-9c299cd5ccad)

By default, the layer order within a *Precomp Clone* is the same as it is in the main comp. However, when you, for example, want to make use of a *Precomp Clone* to create a track matte layer, you might want to change the layer order to customize your matte. On the *Precomp Clone* effect, switch the *Layer Order* to *Custom Order* and move the *Cloned Layer* effects to the position you want them to be in. Then execute *Refresh Connections* and the custom layer order will be created within the *Precomp Clone*.

### Custom Precomp Size

![Precomp Clone with a Custom Size](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MSrLPwKlzNOjgLrkC08%2F-MSrPIanwoLOgsZBbnkV%2FClones---Custom-Size.jpg?alt=media\&token=b20de0a2-acba-4367-8b66-cb1da92afd4e)

A *Precomp Clone* is created with comp size by default. But you can apply a custom size to it too. You can customize the width and height, as well as whether the area should be shifted on the X- and Y-axis. Select the desired values and hit *Refresh Connections*. The size will be cropped/expanded to the defined area and the position of the *Precomp Clone* layer will be corrected in order to stay at exactly the same position (even when the position is animated).

If you want to see a visual preview of how the new size of the *Precomp Clone* is going to look like before applying it, execute [Preview Custom Clone Size](#preview-custom-clone-size).

{% hint style="danger" %}
As of now, a custom precomp size only works if its contained layers are 2D.
{% endhint %}

### Enabling Precomp Transforms

![A Prime Group Clone with Enabled Transforms in order to have Tracking Data applied to it](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MUE5b28RWNQYIXELsyu%2F-MUE9QqJg0OHtu7fbiIA%2FClones---Enabled-Transforms.jpg?alt=media\&token=f28464a8-b282-42a4-ba39-34092c7d6034)

By default, transforms of a *Precomp Clone* are locked. You can, however, also enable transforms. If it's a *Prime Clone*, its contained layers in the main comp will be parented to the *Prime Clone* (if their existing parent is not to another layer in the clone), so that when you move the *Prime Clone*, all layers will move accordingly. The clone layers within the clone comp, however, will not be parented. If it's a regular *Precomp Clone*, its contained layers won't be affected. If the *Prime Clone* contains other *Precomp Clones* without enabled transforms, their transforms will be enabled.

{% hint style="danger" %}
As of now, enabled precomp transforms when you're using a *Prime Clone* only work with 2D layers. If you want to use 3D layers, its z-position must be at 0 for the precomp transforms to properly work.
{% endhint %}

### Custom Clone Layer States

![Cloned Layer Effect](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MS7a46rrKvPGorK49Rt%2F-MS7leGsMYl_4MTFhzgt%2FClones---Custom-States.jpg?alt=media\&token=9e3decc5-7091-44d2-be3e-b4395f9ac1a9)

You can set custom states for all clone layers individually:

* *Enabled/Disabled:* You can enable a clone layer when it's disabled within the main comp and vice versa. Enable the clone layer and disable the source layer when you, for example, want to build a track matte layer using the *Precomp Clone* and the contained layers must not appear in the comp itself.
* *Opacity:* You can set a custom opacity.
* *Trim In/Out Point like Source:* When enabled, the clone layer will get in/out points of the source layer. When disabled, it will stretch across the entire comp.
* *Blending Mode:* You can set the blending mode to several options:

  * Like Source
  * Normal
  * Stencil Alpha
  * Stencil Luma
  * Silhouette Alpha
  * Silhouette Luma

  Change the blending mode when making use of a *Precomp Clone* to create a matte layer. You can set the layers to either *Stencil* or *Silhouette* to build your custom matte.
* *Track Matte:* Changing the track matte state might be useful when layers within the main comp have a track matte and you want the clone layer without a track matte. Or vice versa: set a track matte state for a clone layer when you want to build a custom matte within the clone comp.

### 3D Precomp Clones \[Experimental] <a href="#id-3d-precomp-clones-beta" id="id-3d-precomp-clones-beta"></a>

![3D Precomp Clone with the Z-Position of its contained Layers stuck to 0.](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MUEApVscgnsnO_IV8Zj%2F-MUED1jBA4d7n0mjCCKb%2FClones---3D-Precomp-Clone.jpg?alt=media\&token=5d2b8f96-2608-481e-8c82-9ea4426407a7)

{% hint style="danger" %}
*3D Precomp Clones* is only an experimental feature. That's why it's disabled by default. To use it, go to *Settings*, then to the *Cloning* tab, and enable *Use 3D Precomp Clones*. As of now, there are several limitations when using *3D Clones*:

* Regular *Refresh Connections* doesn't work with *3D Prime Clones*. If you execute it, *Quick Refresh Connections* will be executed instead.
* Unlinking *3D Prime Clones* won't work. When you turn it off, they will be linked again.
* [New Clone Sizes](#custom-precomp-size) cannot be applied to *3D Prime Clones.* You can only use comp size.
* *3D Prime Clones* are incompatible with contained *Matte Merges*. Transforms of matte layers won't match actual transforms. Use *Precomp Clones* to create track mattes with multiple matte layers instead.
* Other bugs might occur when using *3D Precomp Clones*.
  {% endhint %}

You can activate *3D Precomp Clones* by clicking AE's 3D switch and then executing *Refresh Connections*. (This only works when *Precomp Transforms* are enabled. Otherwise, the *Precomp Clone* will be set back to 2D.)&#x20;

If *Collapse Transformation* is disabled on a *Prime Clone*, all contained layers will be converted to 3D but stuck to the z-position of the *Precomp Clone* layer. That way you basically create a 2D comp within the clone comp itself that then is turned 3D in the main comp. The difference to just creating a simple precomp, however, is that you can see all your contained 2D layers in 3D space and position them, apply effects, etc. in the context of the main 3D comp.

{% hint style="warning" %}
The *Orientation* property of the contained layers will be set to \[0, 0, 0] by expression to stick them to the *Precomp Clone* layer. **Make sure to use&#x20;*****Rotation*****&#x20;instead of&#x20;*****Orientation*****&#x20;to rotate the layers.**

Also, an expression is applied to the *Anchor Point* as well to set its z-value to 0. That means, however, that cannot apply an expression yourself to the *Anchor Point*.
{% endhint %}

If *Collapse Transformation* is enabled on a *Prime Clone*, the contained layers will also be converted to 3D, however, they won't be stuck to the z-position of the *Precomp Clone* layer and can be moved around freely.

{% hint style="info" %}
The behavior of *3D Precomp Clones*, described above, only applies to *Prime Clones*. If the clone is a regular clone, the contained layers won't be affected by the clone's 3D state.
{% endhint %}

### Clone and Precomp Modes

![Clone and Precomp Mode Dropdown](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MdH7_pj25jDnmsFxqa_%2F-MdHB440fZgpI5GAQtow%2FCloning---Mode.jpg?alt=media\&token=d1ca3a86-e4b7-48ab-ba5c-be31b327acc0)

There are two different *Clone & Precomp* modes. By default, a mix between the two modes will be executed. You can choose to only execute one of them, too. Go to *Settings / Cloning / Clone and Precomp Mode* to change the mode.

* **Faster for fewer Properties:** This mode will copy all layers to the clone comp and go into every property to link them to the source layer.
  * **Advantages:**
    * It is faster for fewer properties (\~ < 100 effects & layers).
    * The user's clipboard will stay intact.
    * It will not cause problems with AE's *Undo/Redo*.
  * **Disadvantages:**
    * It can get quite slow when dealing with a lot of layers and effects.
    * If you have another script installed that uses a callback function to display errors that happen within the application, the mode can cause various errors. Go to [Known Bugs](https://workflower.constantin-maier.com/known-bugs#cloning-mode-bugs) for more information.
* **Faster for more Properties:** This mode will use AE's native function *Copy with Property Links* to copy all layers to the clone comp.
  * **Advantages:**
    * It is faster for more properties (\~ > 100 effects & layers).
  * **Disadvantages:**
    * Since the mode uses AE's native function, the user's clipboard will get overwritten in order to contain the layers copied to the clone comp.
    * If you undo the cloning action and then try to redo it after that, you will not be able to recreate the original state but rather a state midway through the function's execution. See [Known Bugs](https://workflower.constantin-maier.com/known-bugs#clone-and-precomp-bugs) for more information.

### Using Advanced 3D Renderer's Environment Lights in Precomp Clones

As of [version 2.5](https://workflower.constantin-maier.com/releases#id-2-5), Workflower is compatible with sources to *Advanced 3D* renderer's *Environment Lights* in [Precomp Clones](#clone-and-precomp).

Since it's impossible to read the source information via scripting, you'll have to re-select the source on the *Environment Source* layer created by *Workflower* upon cloning. Afterwards, execute [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections) to include the source in the clone.

### Known *Clone and Precomp* Bugs

{% hint style="warning" %}
[There are known *Clone and Precomp* bugs. Click here to read up on their descriptions as well as potential workarounds.](https://workflower.constantin-maier.com/known-bugs#clone-and-precomp-bugs)
{% endhint %}

## Clone in Comp

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw823JOrUluIO9YwOI%2FIcons-B_17.png?alt=media&#x26;token=d6340281-12df-49c6-b9ee-7e1b28b540d3" alt=""></div>

Clones a layer in comp using a *Calculations* or *Set Matte* effect (Win: Shift+N, Mac: no default shortcut).

{% hint style="danger" %}
*Note for Mac users and when using* [*Individual Scripts Mode*](https://workflower.constantin-maier.com/main-functions/shortcuts#individual-scripts-mode-windows-+-mac) *on Windows:*\
The default shortcut for this function has been removed in [version 1.1](https://workflower.constantin-maier.com/releases#1-1). (If you still want to use a shortcut, please set it yourself in the shortcuts panel.)
{% endhint %}

![Clone in Comp of '3D Building' used to split the Layer](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-WHrTyi00JsdAktDo%2F-MU-eogfzcN8OEaSrgHT%2FClones---Clone-in-Comp-Split.jpg?alt=media\&token=f0273c8b-0598-43ed-9b2d-9132ef2b9de6)

### Advantages of a Clone in Comp

A *Clone in Comp* has a major advantage compared to a *Precomp Clone:*

Because the image data is not linked by expressions but by an effect, you don't have to hit *Refresh Connections* nearly as often as you would when using a *Precomp Clone*. The *Clone in Comp* updates automatically every time you add/remove effects/masks, change the order of effects/masks, or modify non-linkable effect/mask parameters. However, changes on layer switches, parents, blending modes, and layer time properties still require refreshing. For more on refreshing *Clone in Comp* connections, see [its chapter](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections).

You can use a *Clone in Comp* for several purposes (only examples):

* **As a track matte:** A track matte layer always needs to be on top of the matted layer. Sometimes, this is what you want but other times you just want to use an existing layer from the comp that's at a totally different layer index, that you don't want to change. You could use a regular *Set Matte* effect to achieve this matte. However, for this to work, all transform properties need to be the same or both layers need *Collapse Transformation* enabled. That's not always the case, and this is what a *Clone in Comp* can be useful for: It creates an active clone of the layer to be able to place it directly above the other layer and use it as a track matte so that you don't have to worry about different transform properties or collapsed transformations.
* **To simplify working with 2.5D layers:** When working with a 2D layer that has a 3D effect on it (i.e. a 2.5D layer), that's supposed to be integrated into a 3D scene, you might have to split the 2.5D layer at some point because it has to go from behind another 3D layer to before it. You can create a *Clone in Comp* from the 2.5D layer, split source and clone (see [Clone Creation Options](#clone-creation-options)), and have a live copy of the source layer. Another example would be the other way around: You have a 3D layer that has to interact with a 2D layer and at some point, it has to go from behind to before or the other way around. You can also split source and clone by opacity, meaning that the source layer can still be grabbed and moved around in the composition panel, even when a clone layer is active at that time.&#x20;
* **To intensify a layer:** When creating a glow, for example, you might want to duplicate a layer, apply a blur to it and repeat this process several times to create a unique result. When changes are made on the source layer, however, they won't update on the duplicated layers. That's when a *Clone in Comp* can come in handy as a more flexible way to duplicate a layer.

### Disadvantages of a Clone in Comp

There are also some drawbacks when using a *Clone in Comp*:

You can only clone one layer, so it's not possible (like when using a *Precomp Clone*) to merge several layers on one clone layer. Besides, you can't clone shape and text layers. Also, as of now, it's not possible to use custom transforms on a *Clone in Comp*. (In the current *Workflower* build, to transform a *Clone in Comp*, you can use AE's *Transform* effect on the clone layer. This, however, only works with 2D transforms.)

### Clone Creation Options

![Clone in Comp Dialog](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MSrQHOCsDf7O_--xmaN%2F-MSrS0WUwFRIHxZb8i6L%2FClones---Clone-in-Comp.jpg?alt=media\&token=8eed2df1-568d-4f51-ae0e-1afc39725a6e)

#### Cloning Channels

You can choose to either clone *RGBA* or clone *Alpha Only*. Cloning *Alpha Only* using the *Set Matte* effect has three advantages compared to cloning *RGBA* using the *Calculations* effect:

1. It is faster since the *Set Matte* effect is GPU accelerated.
2. *Set Matte* supports 32 bit, while *Calculations* only supports 16 bit.
3. You can extend borders of the clone layer dynamically using the dedicated slider, while, using the *Calculations* effect, the layer needs to be precomped in order to extend the borders.

#### Precomp Source & Expand Border

In certain situations, you might want to extend the borders of a clone layer. For example, when you apply a blur or some other effect that stretches pixels beyond the layer's boundaries. On *Clones in Comp* with a *Set Matte* effect, you simply need to use the *Expand Borders* slider on the *Clone in Comp Settings* effect. On *Clones in Comp* with a *Calculations* effect, you can, when creating the clone, automatically precomp the source and expand the border by a certain percentage. That way, the layer will have empty pixels around its boundaries onto which a blur, for example, can stretch pixels. When using *Precomp Source & Expand Border*, all transform properties of the layer will be adjusted in such a way that the image itself will stay at exactly the same position, even when keyframes were applied.

#### Split Source & Clone at Current Time

When dealing with 2.5D layers, it can be useful to split the source and clone layer at a given time so that the source layer becomes invisible once the clone layer becomes visible. Check this checkbox to quickly execute this action. Examples, when this can be useful, are listed under [Advantages of a Clone in Comp](#advantages-of-a-clone-in-comp).

### Clone Settings

![Clone in Comp Settings Effect](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MTou17JF9DrkVke_1t0%2F-MTov5-u700dZw1mtBpS%2FClones---Clone-in-Comp-FX.jpg?alt=media\&token=d5b2d1f1-b726-42a3-abca-29b4a203ba13)

On the source layer, an effect will be added. On it, you can customize various settings:

* How the opacity of the clones should behave: either it's a custom opacity on each clone, or a custom opacity set for all clones on the settings effect, or it's linked to the source layer opacity.
  * If you choose to use a custom opacity on each clone, you need to modify the clone's opacity on the slider of the dedicated effect on the clone layer, not AE's opacity slider. (This slider will have an expression applied to it and is therefore not usable anymore.) You can execute [Reveal Layer Opacity](https://workflower.constantin-maier.com/miscellaneous-layer-functions#reveal-layer-opacity) to reveal the slider in the timeline, too.

![Clone in Comp Opacity Slider](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MTow0v61eybBdW9czUx%2F-MToymUQFFfR6gBoDIMh%2FClones---Clone-in-Comp-Opacity.jpg?alt=media\&token=d13f64c3-4087-4723-8609-43eac8f78cf7)

* Whether you want to link the in/out point and/or the blending mode to the source layer.
* Whether and by how much you want to expand the clone's borders (see [Precomp Source & Expand Border](#precomp-source-and-expand-border) chapter for more information).

Please note that true 3D objects in AE's *Advanced 3D* renderer cannot contain effects. That's why *Workflower* **cannot** add a *Clone in Comp Settings* effect to those layers. So in case a true 3D object is a *Clone in Comp* source layer, you can control the clone properties only by adjusting the clone layer itself.

## Show Clone Layers

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw8F-C4QFYTchc2_-m%2FIcons-C_17.png?alt=media&#x26;token=55ba04a1-6a20-47a0-8bae-c43a552a9463" alt=""></div>

Shows layers, contained in a *Prime Clone*, while hiding the *Prime Clone* layer itself, or vice-versa (Win: Ctrl+Shift+Return, Mac: macControl+Return).

Needs *Prime Clone* layer or contained layers selected. As of [version 2.5](https://workflower.constantin-maier.com/releases#id-2-5), you can also select a group header that holds a [Group Prime Clone](#group-clone), as well as have no layer selected when executing the function to show/hide all *Prime Clone* layers in comp.

For more information on working with *Prime Clone* layers, see [its chapter](#working-on-prime-clone-source-layers).&#x20;

Using *Show Clone Layers* is a faster way to show/hide *Prime Clone* layers than clicking on the checkbox of the *Precomp Clone's* effect.

Prior to [version 2.5](https://workflower.constantin-maier.com/releases#id-2-5), when hiding *Prime Clone* layers, *Quick Refresh Connections* was executed by default to refresh all clone layers. This is now disabled to improve the performance when showing/hiding a lot of *Prime Clones* layers. You may re-enable this feature by going to the *Cloning Settings*.

## Show and Solo Clone Layers

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw8F-C4QFYTchc2_-m%2FIcons-C_17.png?alt=media&#x26;token=55ba04a1-6a20-47a0-8bae-c43a552a9463" alt=""></div>

**(Added in** [**version 2.5**](https://workflower.constantin-maier.com/releases#id-2-5)**)**

Shows and solos layers, contained in a *Prime Clone*, while hiding the *Prime Clone* layer itself, or vice-versa (Win: Ctrl+Alt+Return, Mac: no default shortcut / Via *Main Menu*: Right-click on *Show Clone Layers*-button, then click *Show and Solo Clone Layers*).

The function is identical to [Show Clone Layers](#show-clone-layers) except it additionally solos the layers.

## Preview Custom Clone Size

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw8ZbKIzCQc6I4cUfP%2FIcons-D_17.png?alt=media&#x26;token=7cfc9f28-1000-4cc5-8f37-3e6d73ce2481" alt=""></div>

Previews the new boundaries of a *Precomp Clone* with custom size (not available via shortcut; Win: *Alt+Click* on the *Cloning Button*; Mac: *Option+Click* on the *Cloning Button*).

![Preview Border of the new Custom Clone Size](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-u6NjyWBKeRvnvZqP%2F-MU-vJLenxrDzBvMZCtE%2FClones---Preview.jpg?alt=media\&token=a15a7508-fd1a-426e-ac0c-0e4ce732f53b)

Use the *Custom Size* sliders on the *Precomp Clone* effect to define the new clone size and the preview - that's linked by expressions to the sliders - will live-update its border. When you're done, hit *Refresh Connections* to apply the new size. After applying, the preview will disappear. If the preview is active but you decide not to apply a custom size, just hit *Refresh Layout* to remove the preview.
