Advanced: New Deploying Blender page #104811

Merged
Brecht Van Lommel merged 2 commits from brecht/blender-manual:deploying into blender-v4.2-release 2024-06-07 14:49:37 +02:00
3 changed files with 112 additions and 3 deletions
Showing only changes of commit 337086d7f7 - Show all commits

View File

@ -61,8 +61,8 @@ and presets.
Environment Variables Environment Variables
--------------------- ---------------------
``BLENDER_USER`` :ref:`command-line-args-environment-variables` can be used to store ``BLENDER_USER`` :ref:`environment variables <command-line-args-environment-variables>`
some or all configuration files in other directories. can be used to store some or all configuration files in other directories.
This may be used for example when using a different configuration for a specific This may be used for example when using a different configuration for a specific
project, without affecting the regular user configuration. project, without affecting the regular user configuration.
@ -110,13 +110,14 @@ Microsoft Store installation:
Environment Variables Environment Variables
--------------------- ---------------------
``BLENDER_SYSTEM`` :ref:`command-line-args-environment-variables` ``BLENDER_SYSTEM`` :ref:`environment variables <command-line-args-environment-variables>`
can be used to bundle additional scripts and extensions, that are not part of the can be used to bundle additional scripts and extensions, that are not part of the
regular Blender installation. regular Blender installation.
This can be used for example to deploy Blender in an animation studio, with This can be used for example to deploy Blender in an animation studio, with
additional add-ons available to all users. additional add-ons available to all users.
.. _blender-directory-path-layout:
Path Layout Path Layout
=========== ===========

View File

@ -0,0 +1,107 @@
.. _deploying-blender:
*****************
Deploying Blender
*****************
It is possible to deploy Blender in environments that are more
restricted, use automation or have other special requirements.
For example in an animation studio or for school courses.
This page contains tips setting up Blender in such environments.
Installing Blender
==================
Blender downloads can be extracted to any directory on the system, as
a self contained installation. Multiple Blender versions can easily
co-exist on the same system, and deployment can be automated using
standard file management tools.
New Blender versions may add, remove or changes functionality that
change the results of production files. For a given project, it is
advisable to use a single LTS (long term support) version of Blender.
LTS versions receive bug fixes for two years.
Working Offline
===============
For security or other reasons, workstation may not have internet access.
By default Blender does not access the internet, however this can be
enabled in the System preferences with the Online Access option.
Working offline can be enforced by running with the ``--offline-mode``
:ref:`command line argument <command-line-args-network-options>`.
Bundling Extensions
===================
When working offline or in a more controlled environment, it may be useful
to provide a set of extensions to all users. These can be served from a
read-only system repository. This repository could exist on a network drive
or in a system directory.
The location of this system extension repository can be manually configured
in the Extensions preferences.
The ``$BLENDER_SYSTEM_REPOSITORY``
:ref:`environment variable <command-line-args-environment-variables>`
can also set the default location. This is a directory, within which a
``system`` directory should exist. Each extension zip file should be
extracted to its own folder, and which should then contain a
``blender_manifest.toml`` file.
Bundling Scripts
================
Besides extensions, it's possible to bundle scripts for presets,
application templates, legacy add-ons, as well as scripts run on startup.
Script directories can be manually added in the File Paths preferences.
The ``$BLENDER_SYSTEM_SCRIPTS`` can also be used to add a script directory
without modifying the preferences.
These script directories are expected to contain specific directories
like ``presets``, ``addons`` and ``startup`` for different types of
scripts. See :ref:`blender-directory-path-layout` for a complete list.
Startup Scripts
---------------
The Blender Python API can be used to customize Blender. This includes
changing preferences, changing the startup file and adding UI elements.
For example a ``startup/enable_addons.py`` script can be created to
enable a set of add-ons for every user.
.. code-block:: python
def register():
import addon_utils
addon_utils.enable("node_wrangler")
def unregister():
pass
if __name__ == "__main__":
register()
VFX Platform
============
Blender follows the `VFX reference platform <https://vfxplatform.com>`_,
which means it is able to run on the same systems as other VFX software
and exchange image, volume and scene files with them.
Python Version
--------------
Blender and the `by module <https://pypi.org/project/bpy/>`_ are only compatible
with a single Python version. This makes it possible for add-ons and VFX software
in general to only have to target a single Python version.
Blender bundles a complete Python installation and does not interact with the
system Python by default. This can be changed with the ``--python-use-system-env``
:ref:`command line argument <command-line-args-python-options>`, if care is
taken to set up a compatible Python version.

View File

@ -17,4 +17,5 @@ This chapter covers advanced use (topics which may not be required for typical u
limits.rst limits.rst
operators.rst operators.rst
blender_directory_layout.rst blender_directory_layout.rst
deploying_blender.rst
appendices/index.rst appendices/index.rst