2020-01-08 10:58:52 +11:00
Installation
============
2021-06-30 18:34:12 +10:00
There are different methods of installation, depending on your situation.
2022-05-04 13:06:39 +10:00
1. **Unstable installation** is recommended for power users helping with testing.
2022-09-07 20:26:44 +10:00
2. **Bundling for Blender** is recommended for distributing the add-on.
2022-05-04 13:06:39 +10:00
3. **Live development environment** is recommended for developers who are actively coding.
2022-08-29 09:14:13 +10:00
4. **Packaged installation** is recommended for those who use a package manager.
2021-07-05 08:57:43 +10:00
2022-04-12 18:30:03 +10:00
Unstable installation
---------------------
2021-06-30 18:34:12 +10:00
2022-04-12 18:30:03 +10:00
**Unstable installation** is almost the same as **Stable installation** , except
that they are typically updated every day. Simply download a daily build from
2024-05-09 16:21:24 +10:00
the `GitHub releases page
2024-08-02 15:56:40 +10:00
<https://github.com/IfcOpenShell/IfcOpenShell/releases?q=blenderbim&expanded=true> `__,
then follow the usual :doc:`installation
instructions</users/quickstart/installation>`.
2021-06-30 18:34:12 +10:00
2024-08-02 15:56:40 +10:00
The BlenderBIM Add-on officially supports all major 64-bit platforms, as well as
the Python version shipped by the Blender Foundation for the most recent three
major Blender versions:
2021-06-30 18:34:12 +10:00
2024-08-02 15:56:40 +10:00
- 64-bit Linux (`` linux-x64 `` )
- 64-bit MacOS Intel (`` macos-x64 `` )
- 64-bit MacOS Silicon (`` macos-arm64 `` )
- 64-bit Windows (`` windows-x64 `` )
- Blender 4.2 with Python 3.11
2021-06-30 18:34:12 +10:00
2024-08-02 15:56:40 +10:00
Due to significant changes in the Blender extensions system, Blender versions
<4.2 are not supported.
Developer builds may exist for different versions of Python but there will be
no guarantee of the uptime or stability of these builds.
Other system specifications match the `Blender Requirements
<https://www.blender.org/download/requirements/> `_ and the ` VFX Platform
<https://vfxplatform.com/> `_ standard.
2024-05-31 11:30:26 +10:00
2022-04-12 18:30:03 +10:00
Sometimes, a build may be delayed, or contain broken code. We try to avoid this,
but it happens.
2021-12-10 09:43:17 +11:00
2022-09-07 20:26:44 +10:00
Bundling for Blender
2022-04-12 18:30:03 +10:00
--------------------
2020-01-08 10:58:52 +11:00
2022-09-07 20:26:44 +10:00
Instead of waiting for an official release on the BlenderBIM Add-on website, it
is possible to make your own Blender add-on from the bleeding edge source code
of BlenderBIM. BlenderBIM is coded in Python and doesn't require any
compilation, so this is a relatively easy process.
2021-06-30 18:34:12 +10:00
2021-12-10 09:43:17 +11:00
Note that the BlenderBIM Add-on does depend on IfcOpenShell, and IfcOpenShell
does require compilation. The following instructions will use a pre-built
IfcOpenShell (using an IfcOpenBot build) for convenience. Instructions on how to
compile IfcOpenShell is out of scope of this document.
2021-06-30 18:34:12 +10:00
You can create your own package by using the Makefile as shown below. You can
2022-10-31 19:04:57 +11:00
choose between a `` PLATFORM `` of `` linux `` , `` macos `` , `` macosm1 `` , and `` win `` .
2024-08-02 15:56:40 +10:00
You can choose between a `` PYVERSION `` of `` py312 `` , `` py311 `` , `` py310 `` , or
`` py39 `` .
2024-06-21 18:28:52 +05:00
.. code-block :: bash
2021-06-30 18:34:12 +10:00
2024-06-21 18:28:52 +05:00
cd src/blenderbim
make dist PLATFORM = linux PYVERSION = py311
ls dist/
2021-06-30 18:34:12 +10:00
2022-04-12 18:07:39 +10:00
This will give you a fully packaged Blender add-on zip that you can distribute
and install.
2022-04-12 18:30:03 +10:00
Live development environment
----------------------------
2022-04-12 18:07:39 +10:00
2022-04-12 18:30:03 +10:00
One option for developers who want to actively develop from source is to follow
2024-08-02 15:56:40 +10:00
the instructions from :ref: `devs/installation:Bundling for Blender` . However,
creating a build, uninstalling the old add-on, and installing a new build is a
slow process. Although it works, it is very slow, so we do not recommend it.
2022-04-12 18:07:39 +10:00
2024-08-02 15:56:40 +10:00
A more rapid approach is to follow the :ref:`devs/installation:Unstable
installation` method, as this provides all dependencies for you out of the box.
2021-06-30 18:34:12 +10:00
2022-08-26 13:37:45 +10:00
Once you've done this, you can replace certain Python files that tend to be
updated frequently with those from the Git repository. We're going to use
2024-08-02 15:56:40 +10:00
symbolic links, so we can code in our Git repository, and see the changes in
our Blender installation (you will need to restart Blender to see changes).
2021-06-30 18:34:12 +10:00
2022-08-26 13:37:45 +10:00
For Linux or Mac:
2021-06-30 18:34:12 +10:00
2024-07-22 12:46:49 +05:00
.. literalinclude :: ../../scripts/installation/dev_environment.sh
:language: bash
:caption: dev_environment.sh
2022-08-26 13:37:45 +10:00
2024-06-27 11:45:05 +10:00
Or, if you're on Windows, you can use the batch script below. You need to run
it as an administrator. Before running it follow the instructions descibed
in the `rem` tags.
2021-07-07 16:10:47 +10:00
2024-07-22 12:46:49 +05:00
.. literalinclude :: ../../scripts/installation/dev_environment.bat
:language: bat
:caption: dev_environment.bat
2021-07-07 16:10:47 +10:00
2021-06-30 18:34:12 +10:00
After you modify your code in the Git repository, you will need to restart
2022-08-23 17:15:11 +10:00
Blender for the changes to take effect.
2022-04-12 18:30:03 +10:00
2022-08-26 13:37:45 +10:00
The downside with this approach is that if a new dependency is added, or a
compiled dependency version requirement has changed, or the build system
changes, you'll need to fix your setup manually. But this is relatively rare.
2024-06-27 11:45:05 +10:00
Reviewing the Makefile history, `here <https://github.com/IfcOpenShell/IfcOpenShell/commits/v0.8.0/src/blenderbim/Makefile> `__ , is one quick way to see if a dependency has changed.
2022-08-26 13:37:45 +10:00
.. seealso ::
There is a `useful Blender Addon
<https://blenderartists.org/uploads/short-url/yto1sjw7pqDRVNQzpVLmn51PEDN.zip>`__
(see `forum thread
2022-08-29 09:14:13 +10:00
<https://blenderartists.org/t/reboot-blender-addon/640465/13>`__) that adds
2022-08-26 13:37:45 +10:00
a Reboot button in File menu. In this way, it's possible to directly
restart Blender and test the modified source code. There is also a VS Code
add-on called `Blender Development
<https://marketplace.visualstudio.com/items?itemName=JacquesLucke.blender-development>`__
that has a similar functionality.
2022-04-18 09:56:08 +02:00
2022-08-29 11:40:38 +10:00
Packaged installation
---------------------
2022-04-12 18:30:03 +10:00
2022-09-01 09:05:06 +10:00
- **Arch Linux** : `Direct from Git <https://aur.archlinux.org/packages/ifcopenshell-git/> `__ .
2022-08-29 09:14:13 +10:00
- **Chocolatey on Windows** : `Unstable <https://community.chocolatey.org/packages/blenderbim-nightly/> `__ .
2022-04-12 18:30:03 +10:00
Tips for package managers
-------------------------
The BlenderBIM Add-on is fully contained in the `` blenderbim/ `` subfolder of the
Blender add-ons directory. This is typically distributed as a zipfile as per
Blender add-on conventions. Within this folder, you'll find the following file
structure:
::
2024-08-02 15:56:40 +10:00
core/ (Blender agnostic core logic)
tool/ (Blender specific shared functionality)
2022-08-23 17:15:11 +10:00
bim/ (Blender specific UI)
2024-08-02 15:56:40 +10:00
libs/ (other assets)
wheels/ (dependencies)
2022-04-12 18:30:03 +10:00
__init__.py
This corresponds to the structure found in the source code `here
2024-06-27 11:45:05 +10:00
<https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.8.0/src/blenderbim/blenderbim> `__.
2022-04-12 18:30:03 +10:00
The BlenderBIM Add-on is complex, and requires many dependencies, including
Python modules, binaries, and static assets. When packaged for users, these
dependencies are bundled with the add-on for convenience.
If you choose to install the BlenderBIM Add-on and use your own system
dependencies, the source of truth for how dependencies are bundled are found in
the `Makefile
2024-08-02 15:56:40 +10:00
<https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/src/blenderbim/Makefile> `__
in the `` dist `` target.
2022-04-12 18:30:03 +10:00
2024-08-02 15:56:40 +10:00
Add-on compatibility
--------------------
2022-04-12 18:30:03 +10:00
2024-08-02 15:56:40 +10:00
The BlenderBIM Add-on is a non-trivial add-on. By turning Blender into a
graphical front-end to a native IFC authoring platform, some fundamental Blender
features (such as hotkeys for basic functionality like object deletion or
duplication) have been patched and many dependencies have been introduced.
Other add-ons may no longer work as intended when the BlenderBIM Add-on is
enabled, or vice versa, the BlenderBIM Add-on may no longer work as intended
when other add-ons are enabled.
Known scenarios which will lead to add-on incompatibility include:
- The add-on also overrides the same hotkeys. For example, if an add-on
overrides the "X" key to delete an object, you will need to manually trigger
(either via menu or custom hotkey) the BlenderBIM Add-on equivalent operator
(e.g. IFC Delete).
- The add-on uses object deletion or duplication macros with dictionary
override. Note that this is also deprecated in Blender, so the other add-on
should be updated to fix this.
- The add-on requires a conflicting dependency, or a conflicting version of the
same dependency. Neither add-on may work simultaneously.