Skip to content

Commit

Permalink
move perforce docs from unreal to version control docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaJafar committed Sep 27, 2024
1 parent aa74214 commit 1cfdcfe
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 71 deletions.
29 changes: 5 additions & 24 deletions website/docs/addon_unreal_admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,31 +65,12 @@ Default value could be there as:
Please notice platform suport with `windows` key (could be also `linux` value).


### Perforce support

There is also a Perforce support for rendering on a Deadline. `ayon-version-control` addon needs to be installed and configured for that.
(Install addon from AYON Marketplace or from https://github.com/ynput/ayon-version-control).

This addon requires configuration in `Studio Settings` where `Perforce` should be selected as `Backend name`, `Host name` and `Port` filled.

Each artist using this integration need to configure their `Local Setting` in `ayon+settings://version_control/local_setting?project=ayon_test&site=XXX-YYY-ZZZ`

![Unreal AYON Local Settings](assets/unreal_perforce_local_settings.png)

It is expected that value in `My Workspace Directory` would be pointing to existing and configured Perforce workspace on artist machine.
Initial checkout from Perforce should be done by P4V tool.

AYON Perforce integration handles currently only rendering from P4 on Deadline, commits to Unreal project should be done in P4V or with
official Unreal Perforce plugin inside of Unreal editor.

Each Deadline worker for this integration need to have set env vars:
- P4PORT (`perforce_host:1666`)
- P4USER
- P4PASSWD

Again these variables could be set locally on the worker or be controlled by AYON in `ayon+settings://applications/applications/unreal/variants/3/environment`.
Please make sure you are modifying appropriate `Variant` of Unreal application as this configuration is separate.
## AYON Perforce Support

:::tip
AYON has a dedicated addon for Perforce support.
Please refer to [Version Control Admin Docs](category/version-control) to learn more.
:::

## Manually installing Qt bindings

Expand Down
26 changes: 5 additions & 21 deletions website/docs/addon_unreal_artist.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,25 +615,9 @@ These could be modified by AYON admin in `ayon+settings://unreal/render_queue_pa

![Unreal AYON Render Queue and Settings](assets/unreal_render_queue_and_settings.png)

### Perforce integration
## AYON Perforce Support

If Perforce integration is enabled by configured `ayon-version-control` addon in the bundle, artists could sync to any previous
changelist via small dialog that will open before opening Unreal editor.

Artist need to have its Perforce username, password and path to existing configured Perforce workspace configure in `ayon+settings://version_control/local_setting?project=ayon_test&site=XXX-YYY-ZZZ`

![Unreal AYON Local Settings](assets/unreal_perforce_local_settings.png)

Any line with changelist could be selected and synched by `Sync to` button. When synching process finishes, it will be highlighted under the list of changes.

It is expected that commits in Unreal projects will be done inside in Unreal editor official Perforce tool or via `P4V`

![Unreal AYON Changes Viewer](assets/unreal_changes_viewer.png)

Additional automatic instance will be created in Publisher to highlight last existing changelist id. This information will be
published to AYON server, will be used to Perforce on Deadline to synchronize to that changelist before rendering and might be used in future enhancement of integration.

Name of the instance will start with `changelist_metadata` prefix and instance must be enabled to trigger usage of Perforce on the Deadline.
(Without it Deadline could render just from current state of Unreal project file.)

![Unreal AYON Changelist Metadata](assets/unreal_perforce_changelist_metadata.png)
:::tip
AYON has a dedicated addon for Perforce support.
Please refer to [Version Control Artist Docs](addon_version_control_artist.md) to learn more.
:::
75 changes: 49 additions & 26 deletions website/docs/addon_version_control_artist.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,63 +16,86 @@ Currently, the addon implements basic Perforce support inside of Unreal.

:::info Perforce Workspace
It is expected that P4 workspaces would be setup and existed on artists machines.

Initial checkout from Perforce should be done by P4V tool.
:::

> Settings Location: `ayon+settings://version_control/local_setting?project={project_name}&site={site_id}`
![](assets/version_control/site_settings_user_credentials.png)

Perforce site settings user name, password and workspace directory.
You'd need to setup your Perforce site settings: user name, password and path to existing configured Perforce workspace.

### Launch Unreal with version control enabled

When starting Unreal via AYON Launcher, a pop window will show up before Unreal launch allows you to sync to specific a change list.
![](assets/version_control/perforce_changes_viewer.png)

## How Perforce support works
When starting Unreal via AYON Launcher, a pop window will show up before Unreal launch allows you to sync to specific a change list.

:::tip
We assume that you always on the latest change list.
:::
Any line with changelist could be selected and synched by `Sync to` button. When synching process finishes, it will be highlighted under the list of changes.

## How Perforce support works

## Workflows
### Workflow

Perforce doesn't replace regular AYON publishing.
Because commit changes to perforce and publish to AYON are two separate actions.
And, you can do both for the same asset!

So for example, you can use AYON to publish assets and use perforce to setup and version control your scene.

Also, AYON will create `changelist_metadata` product by default in your Unreal Scene.
`changelist_metadata` product highlights the last existing `change list` id at the time of publishing
This product must be enabled to trigger usage of Perforce on the Deadline.
Without it Deadline will just render from current state of Unreal project file.

![Unreal AYON Changelist Metadata](assets/version_control/unreal_perforce_changelist_metadata.png)

### Commit Strategy

| Unreal | Visible in AYON |
|--|--|
| commit | |
| commit | |
| Publish to AYON ||
| commit | |
| Publish to AYON ||
Any manual commits done in Unreal projects via `Unreal editor official Perforce tool` or via `P4V` won't be add to AYON published products.
Unlike publishing to AYON via AYON publisher will commit to Perforce any uncommitted changes and then publish your work to AYON.

| Inside Unreal | Visible in Perforce | Visible in AYON |
|--|--|--|
| commit manually || |
| commit manually || |
| Publish to AYON |||
| commit manually || |
| Publish to AYON |||

### `Publish to AYON` Process

When having any workfile changes while workfile instance is enabled, AYON will commit them automatically before publishing.

Publish `change list` info as Json file.
Publish your files to AYON.
if you are publishing the same asset that you are pushing to perforce, then AYON publish will be more like taking a snapshot of that asset at a particular `change list` and save it like any other published assets. which makes it available for other DCCs as well.
- Commit to Perforce any uncommitted changes.
- Publish `changelist metadata` product as json file.
- Publish your files to AYON.

:::info
If you are publishing the same asset that you are pushing to perforce, then AYON publish will be more like taking a snapshot of that asset at a particular `change list` and save it like any other published assets. which makes it available for other DCCs as well.
:::


### Deadline

:::info
Current Deadline implementation requires P4 depots to be of type 'stream' and workspace to be assigned to a stream.
:::
<!-- TODO: This should go to the admin docs.
We should add here instructions for artist about submitting to deadline while using Perforce, explain how it works
and how to modify the change list for a particular render.
When having any workfile changes while workfile instance is enabled, AYON will commit them automatically before sending the deadline job.
`changelist_metadata` replaces `workfile` as there are no versioned Unreal projects (because of size).
-->

<!-- TODO: Answer the following questions
## FAQ
:::info
Current Deadline implementation requires `P4` depots to be of type 'stream' and workspace to be assigned to a stream.
:::

### Do the addon support submitting a deadline job with a specific change list number?
Unreal Perforce Deadline Support requires our [custom `UnrealEngine5` deadline plugin](https://github.com/ynput/ayon-deadline/tree/develop/client/ayon_deadline/repository/custom/plugins/UnrealEngine5) which implements `PreLoad` scripts that syncs your project to `change list` id within the `changelist_metadata` before rendering.

Our custom `UnrealEngine5` deadline plugin expects the following environment variables for each Deadline workers:
- `P4PORT`: Port number that perforce server uses `http://localhost:{Port}`.
- `P4USER`: Perforce user.
- `P4PASSWD`: Password of the given user.

### What happens when I submit a render, pause it, do some commits in perforce and requeue the render job? -->
:::tip Setting Environment Variables
Environment variables could be set locally on the worker or be set on studio or project wise by admin via [application settings](addon_applications_admin.md#applications-definitions).
:::
Binary file removed website/docs/assets/unreal_changes_viewer.png
Binary file not shown.
Binary file not shown.
Binary file modified website/docs/assets/version_control/perforce_changes_viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1cfdcfe

Please sign in to comment.