From b034ccb9d55cda84a466dfc19c3ef3e41a8d25f9 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 26 Apr 2021 10:57:56 +0200 Subject: [PATCH] added blender PySide2 install guide --- website/docs/admin_hosts_blender.md | 80 +++++++++++++++++++++++++++++ website/sidebars.js | 7 +++ 2 files changed, 87 insertions(+) create mode 100644 website/docs/admin_hosts_blender.md diff --git a/website/docs/admin_hosts_blender.md b/website/docs/admin_hosts_blender.md new file mode 100644 index 0000000000..7b7cbf0aeb --- /dev/null +++ b/website/docs/admin_hosts_blender.md @@ -0,0 +1,80 @@ +--- +id: admin_hosts_blender +title: Blender +sidebar_label: Blender +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## Blender requirements +Blender's integration requires to use **PySide2** module inside blender. Module is different for Blender versions and platforms so can't be bundled with OpenPype. + +### How to install + +:::info Permissions +This step requires Admin persmission. +::: + + + + + +Find python executable inside your Blender installation folder. Usually is located in **C:\\Program Files\\Blender Foundation\\Blender {version}\\{version}\\python\\bin\\python.exe** (This may differ in future blender version). + +Open Powershell or Command Prompt as Administrator and run commands below (Example commands are for **Blender 2.83** installed to default directory). +```bash +# Change directory to python executable directory. +> cd C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin + +# Run pip install command. +> python -m pip install PySide2 +``` + + + + + +Procedure may differ based on Linux distribution and blender distribution. Some Blender distributions are using system Python in that case it is required to install PySide2 using pip to system python (Not tested). + +**These instructions are for Blender using bundled python.** + +Find python executable inside your blender application. + +:::note Find python executable in Blender +You can launch Blender and in "Scripting" section enter commands to console. +```bash +>>> import bpy +>>> print(bpy.app.binary_path_python) +'/path/to/python/executable' +``` +::: + +Open terminal and run pip install command below. + +*Replace `/usr/bin/blender/2.83/python/bin/python3.7m` with your path.* +```bash +> /usr/bin/blender/2.83/python/bin/python3.7m -m pip install PySide2 +``` + +:::warning No module named pip +If you'll get error `No module named pip` you'll have to do few steps first. Open new terminal and run the python executable from Blender (entering full path). +```bash +# Run Python executable +> /usr/bin/blender/2.83/python/bin/python3.7m +# Python process should start +>>> import ensurepip +>>> ensurepip.bootstrap() +``` +You can close new terminal. Run pip install command above again. Now should work as expected. +::: + + + + diff --git a/website/sidebars.js b/website/sidebars.js index 82f063e252..26371e58ce 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -71,6 +71,13 @@ module.exports = { "module_clockify" ], }, + { + type: "category", + label: "Integrations", + items: [ + "admin_hosts_blender" + ], + }, { type: "category", label: "Releases",