Skip to content

Commit

Permalink
Merge pull request #128 from ynput/resolve-OTIO-install-instructions
Browse files Browse the repository at this point in the history
resolve updating admin page
  • Loading branch information
jakubjezek001 authored Mar 6, 2024
2 parents 6e076aa + 54c0ac8 commit c5a628d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 24 deletions.
73 changes: 49 additions & 24 deletions website/docs/addon_resolve_admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,25 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Resolve requirements
Due to the way resolve handles python and python scripts there are a few steps required steps needed to be done on any machine that will be using AYON with resolve.
Resolve uses a separate Python interpreter (it does not come with Python itself). The interpreter needs to have installed PySide2 (or PySide6 if on MacOS) and OpenTimelineIO dependencies for Ayon to work correctly. Bellow you can find instructions on how to install them into an installed Python of your choice.

### Installing Resolve's own python 3.6 interpreter.
Resolve uses a hardcoded method to look for the python executable path. All of tho following paths are defined automatically by Python msi installer. We are using Python 3.6.2.
- Resolve 17 - our recommended version `Python 3.6.2`
- Resolve 18 - our recommended version range `Python 3.10.x` (in complience with Ayon)


### Configuring settings for Python home directory
To be able to run python in Resolve you need to set `RESOLVE_PYTHON3_HOME` environment variable to the directory path of your Python interpreter version.

Open your server Studio settings and go to **Application** addon `ayon+settings://applications/applications/resolve`. Here you can add the path to the **Environment** section.

![Ayon/Application/Resolve](assets/resolve_python_home_application_addon.png)


### Installing Python dependencies

#### PySide2 or PySide6

AYON is using its own window widget inside Resolve, for that reason PySide2 (or PySide6 if on MacOS) has to be installed into the python.

<Tabs
groupId="platforms"
Expand All @@ -31,25 +46,40 @@ Resolve uses a hardcoded method to look for the python executable path. All of t

<TabItem value="win">

`%LOCALAPPDATA%\Programs\Python\Python36`

```bash
cd <a path you had set to RESOLVE_PYTHON3_HOME>
python.exe -m pip install PySide2
```

</TabItem>
<TabItem value="linux">

`/opt/Python/3.6/bin`

```bash
cd <a path you had set to RESOLVE_PYTHON3_HOME>
python3 -m pip install PySide2
```

</TabItem>
<TabItem value="mac">

`~/Library/Python/3.6/bin`

```bash
cd <a path you had set to RESOLVE_PYTHON3_HOME>
python3 -m pip install PySide6
```

</TabItem>
</Tabs>

### OpenTimelineIO

### Installing PySide2 into python 3.6 for correct gui work
:::warning Permissions
Installation guide for OpenTimelineIO in Python 3.6 can be found [here](https://github.com/ynput/OpenPype/blob/develop/openpype/hosts/resolve/README.markdown#basic-setup).
:::

AYON is using its own window widget inside Resolve, for that reason PySide2 has to be installed into the python 3.6 (as explained above).
AYON is using OpenTimelineIO for editorial publishing. OpenTimelineIO has to be installed into the python.

<Tabs
groupId="platforms"
Expand All @@ -62,56 +92,51 @@ AYON is using its own window widget inside Resolve, for that reason PySide2 has

<TabItem value="win">

paste to any terminal of your choice

```bash
%LOCALAPPDATA%\Programs\Python\Python36\python.exe -m pip install PySide2
cd <path to RESOLVE_PYTHON3_HOME>
python.exe -m pip install OpenTimelineIO
```

</TabItem>
<TabItem value="linux">

paste to any terminal of your choice

```bash
/opt/Python/3.6/bin/python -m pip install PySide2
cd <a path you had set to RESOLVE_PYTHON3_HOME>
python3 -m pip install OpenTimelineIO
```

</TabItem>
<TabItem value="mac">

paste to any terminal of your choice

```bash
~/Library/Python/3.6/bin/python -m pip install PySide2
cd <a path you had set to RESOLVE_PYTHON3_HOME>
python3 -m pip install OpenTimelineIO
```

</TabItem>
</Tabs>

<div class="row markdown">

### Set Resolve's Fusion settings for Python 3.6 interpereter
### Debugging if Python is not working in Resolve

<div class="col col--6 markdown">

#### Set Resolve's Fusion settings for Python 3 interpreter

As it is shown in below picture you have to go to Fusion Tab and then in Fusion menu find Fusion Settings. Go to Fusion/Script and find Default Python Version and switch to Python 3.6
In case Resolve is not showing Ayon menu, please have a look into Resolve's console and click to _Py3_ tab. If it is not working then Python is not correctly connected to Resolve. One of the reasons might be that Fusion is not set to use Python 3.6 interpreter.

</div>

<div class="col col--6 markdown">
As it is shown in below picture you have to go to Fusion Tab and then in Fusion menu find Fusion Settings. Go to Fusion/Script and find Default Python Version and switch to Python 3.6

![Create menu](assets/resolve_fusion_tab.png)
![Create menu](assets/resolve_fusion_menu.png)
![Create menu](assets/resolve_fusion_script_settings.png)

</div>
</div>

### Custom DaVinci Resolve Python 3.x interpreter

In the **Studio Settings** -> **Applications** -> **Resolve** section, you can change the environment variables to configure a custom python interpreter.
In the **Studio Settings** / **Applications** / **Resolve** section, you can change the environment variables to configure a custom python interpreter.

e.g. An example of a possible configuration, or use hard-coded and write it in the environment configuration.

Expand Down
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 c5a628d

Please sign in to comment.