<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.luxcorerender.org/index.php?action=history&amp;feed=atom&amp;title=Developing_and_debugging_BlendLuxCore_v2.10</id>
	<title>Developing and debugging BlendLuxCore v2.10 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.luxcorerender.org/index.php?action=history&amp;feed=atom&amp;title=Developing_and_debugging_BlendLuxCore_v2.10"/>
	<link rel="alternate" type="text/html" href="https://wiki.luxcorerender.org/index.php?title=Developing_and_debugging_BlendLuxCore_v2.10&amp;action=history"/>
	<updated>2026-05-19T14:31:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.luxcorerender.org/index.php?title=Developing_and_debugging_BlendLuxCore_v2.10&amp;diff=2405&amp;oldid=prev</id>
		<title>CodeHD: Add note about deprecation</title>
		<link rel="alternate" type="text/html" href="https://wiki.luxcorerender.org/index.php?title=Developing_and_debugging_BlendLuxCore_v2.10&amp;diff=2405&amp;oldid=prev"/>
		<updated>2025-10-07T17:53:05Z</updated>

		<summary type="html">&lt;p&gt;Add note about deprecation&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:53, 7 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;b&amp;gt;Note: This page is documenting the development process used in v2.10.x of BlendLuxCore. The content is no longer under active development. See the main article [[Developing and debugging BlendLuxCore]] for the latest instructions.&amp;lt;/b&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Introduction =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Introduction =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>CodeHD</name></author>
	</entry>
	<entry>
		<id>https://wiki.luxcorerender.org/index.php?title=Developing_and_debugging_BlendLuxCore_v2.10&amp;diff=2404&amp;oldid=prev</id>
		<title>CodeHD: Created page with &quot;= Introduction =  == Goal and audience == This document explains the approach to install a development version of BlendLuxCore (BLC) in Blender, so that it&#039;s possible to test and debug it.&lt;br&gt; The targeted audience encompasses: * BlendLuxCore development contributors * BlendLuxCore advanced users/alpha testers who have been provided a dev version of BLC, in order to test a new feature. * LuxCore developers who want to use Blender as a tool to test changes to the core eng...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.luxcorerender.org/index.php?title=Developing_and_debugging_BlendLuxCore_v2.10&amp;diff=2404&amp;oldid=prev"/>
		<updated>2025-10-07T17:45:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Introduction =  == Goal and audience == This document explains the approach to install a development version of BlendLuxCore (BLC) in Blender, so that it&amp;#039;s possible to test and debug it.&amp;lt;br&amp;gt; The targeted audience encompasses: * BlendLuxCore development contributors * BlendLuxCore advanced users/alpha testers who have been provided a dev version of BLC, in order to test a new feature. * LuxCore developers who want to use Blender as a tool to test changes to the core eng...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
== Goal and audience ==&lt;br /&gt;
This document explains the approach to install a development version of BlendLuxCore (BLC) in Blender, so that it&amp;#039;s possible to test and debug it.&amp;lt;br&amp;gt;&lt;br /&gt;
The targeted audience encompasses:&lt;br /&gt;
* BlendLuxCore development contributors&lt;br /&gt;
* BlendLuxCore advanced users/alpha testers who have been provided a dev version of BLC, in order to test a new feature.&lt;br /&gt;
* LuxCore developers who want to use Blender as a tool to test changes to the core engine.&lt;br /&gt;
&lt;br /&gt;
== Statement of problem ==&lt;br /&gt;
BlendLuxCore (BLC) is composed of two parts:&lt;br /&gt;
* A Python module, essentially identical to the [https://github.com/LuxCoreRender/BlendLuxCore BlendLuxCore] repository.&lt;br /&gt;
* Underlying pyluxcore library, compiled from the [https://github.com/LuxCoreRender/LuxCore LuxCore] repository. Typically distributed as a Python wheel.&lt;br /&gt;
&lt;br /&gt;
The python module is distributed as a zip-file, which is installed in Blender as an extension. During the installation process, the pyluxcore-wheel is downloaded from PyPi. During subsequent startup of Blender, the python script verifies the presence of pyluxcore and an additional (time-consuming) download is not necessary.&lt;br /&gt;
&lt;br /&gt;
However, when developing BLC, we typically need to:&lt;br /&gt;
* Make Blender load a development version of the python module&lt;br /&gt;
* And optionally make BLC load a development version of the pyluxcore-wheel&lt;br /&gt;
&lt;br /&gt;
The first goal can be achieved via an environment variable:&lt;br /&gt;
* &amp;lt;code&amp;gt;BLC_DEV_PATH&amp;lt;/code&amp;gt;: path _folder containing_ the development repo of BlendLuxCore&lt;br /&gt;
&lt;br /&gt;
For the second goal, two methods are available:&lt;br /&gt;
* Another environment variable, &amp;lt;code&amp;gt;BLC_WHEEL_PATH&amp;lt;/code&amp;gt;: path to a development version of the wheel&lt;br /&gt;
* A subfolder &amp;lt;code&amp;gt;pyluxcore_custom/&amp;lt;/code&amp;gt; within the installed python module. A development version of the wheel can be copied into this folder.&lt;br /&gt;
&lt;br /&gt;
These methods will be explained in detail in the sections below.&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
In the next parts of the document, we shall assume:&lt;br /&gt;
&lt;br /&gt;
You have set a development environment on your local computer with:&lt;br /&gt;
* a cloned repository of BlendLuxCore&lt;br /&gt;
* and optionally a cloned repository of LuxCore&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You know how to &amp;quot;pack&amp;quot; BlendLuxCore, ie build an installable package of BLC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -S . -B out -DCMAKE_BUILD_TYPE=Release&lt;br /&gt;
cmake --build out&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You know how to build a test wheel from LuxCore:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make wheel-test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Scenario #1: Working on BLC, using standard pyluxcore =&lt;br /&gt;
&lt;br /&gt;
The first goal can be achieved via an environment variable:&lt;br /&gt;
* &amp;lt;code&amp;gt;BLC_DEV_PATH&amp;lt;/code&amp;gt;: path folder containing the development repo of BlendLuxCore&lt;br /&gt;
&lt;br /&gt;
In the environment where you run Blender, and BlendLuxCore has already been installed using the normal installation method, set &amp;lt;code&amp;gt;BLC_DEV_PATH&amp;lt;/code&amp;gt; to the path of your dev repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;export BLC_DEV_PATH=/path/to/folder/containing/BlendLuxCore&amp;lt;/pre&amp;gt;&lt;br /&gt;
For clarification, set this folder like you would set the systems &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt; variable, i.e. so that Python can &amp;lt;code&amp;gt;import BlendLuxCore&amp;lt;/code&amp;gt; from this location!&lt;br /&gt;
&lt;br /&gt;
When this variable is set, all Python code from the development repo will be loaded, &amp;lt;b&amp;gt;except&amp;lt;/b&amp;gt; the main &amp;lt;code&amp;gt;__init__.py&amp;lt;/code&amp;gt; file. Changes to the latter may require a full reinstallation of BlendLuxCore, depending on what was changed.&lt;br /&gt;
&lt;br /&gt;
As a verification of this working correctly, the console output of Blender at startup will show the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[BLC] USING LOCAL DEV VERSION OF BlendLuxCore&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Scenario #2: Working on pyluxcore =&lt;br /&gt;
&lt;br /&gt;
For the second goal, two methods are available:&lt;br /&gt;
* Another environment variable, &amp;lt;code&amp;gt;BLC_WHEEL_PATH&amp;lt;/code&amp;gt;: path to a development version of the wheel&lt;br /&gt;
* A subfolder &amp;lt;code&amp;gt;pyluxcore_custom/&amp;lt;/code&amp;gt; within the installed Python module. A development version of the wheel can be copied into this folder.&lt;br /&gt;
Note that the presence of a file inside &amp;lt;code&amp;gt;pyluxcore_custom/&amp;lt;/code&amp;gt; will take precedence over the &amp;lt;code&amp;gt;BLC_WHEEL_PATH&amp;lt;/code&amp;gt; variable!&lt;br /&gt;
To simplify further explanations, all explanations are presented in terms of the &amp;lt;code&amp;gt;BLC_WHEEL_PATH&amp;lt;/code&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
When this variable is set, BLC computes a hash of the linked wheel. This hash is compared against information stored in the file &amp;lt;code&amp;gt;pyluxcore_installation_info.txt&amp;lt;/code&amp;gt;, located within the installed Python module. If the information matches, installation is skipped. Else, if it does not match, the local pyluxcore-wheel will be installed, replacing the previous version.&lt;br /&gt;
The text file also stores information if the previous installation was from PyPi or from a local wheel. This means, when the environment variable is unset after testing, it will again be replaced with the regular version from PyPi.&lt;br /&gt;
&lt;br /&gt;
As a verification, check for the following lines in the console output of Blender at startup:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[BLC] Installing local version of pyluxcore&amp;lt;/code&amp;gt; --&amp;gt; A new local version will be installed. Replaces any previous installation.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[BLC] skipping pyluxcore installation. Custom wheel matching hash already installed.&amp;lt;/code&amp;gt; --&amp;gt; A local version was previously installed and is used again. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[BLC] installing pyluxcore version:&amp;lt;/code&amp;gt; --&amp;gt; pyluxcore will be installed from PyPi. Replaces any previous installation.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[BLC] skipping pyluxcore installation. Specified version already installed.&amp;lt;/code&amp;gt; --&amp;gt; A PyPi version was previously installed and is used again.&lt;br /&gt;
&lt;br /&gt;
(Note: Further error messages exist but they are out of the scope of this article.)&lt;br /&gt;
&lt;br /&gt;
= Tips &amp;amp; Tricks =&lt;br /&gt;
&lt;br /&gt;
== Useful directories ==&lt;br /&gt;
&lt;br /&gt;
The extension is installed in:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;$HOME/.config/blender/&amp;lt;blender-version&amp;gt;/extensions/user_default&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The wheel is installed in:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;$HOME/.config/blender/&amp;lt;blender version&amp;gt;/extensions/.local/lib/python&amp;lt;python-version&amp;gt;/site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Utility shell script for launching Blender ==&lt;br /&gt;
&lt;br /&gt;
The BlendLuxCore repository contains a shell script, called &amp;lt;code&amp;gt;blendev&amp;lt;/code&amp;gt; (short for blender-development), located inside the &amp;lt;code&amp;gt;debug-helpers&amp;lt;/code&amp;gt; subdirectory.&lt;br /&gt;
The purpose of this script is to easily launch Blender and switch between multiple versions of Blender, a regularly installed version of BlendLuxCore and pyluxcore, local development code of BlendLuxCore, and locally compiled versions of pyluxcore.&lt;br /&gt;
At the time of writing, this script is available only for linux/bash development.&lt;br /&gt;
&lt;br /&gt;
Please see the &amp;lt;code&amp;gt;Readme.md&amp;lt;/code&amp;gt; supplied alongside the script, and its internal help output &amp;lt;code&amp;gt;blendev -h&amp;lt;/code&amp;gt; for detailed instructions on how to use it.&lt;br /&gt;
&lt;br /&gt;
== Wheel not loading - Python version mismatch between System and Blender ==&lt;br /&gt;
&lt;br /&gt;
You may work in an environment where the version of the system-wide Python interpreter is different from that of Blender&amp;#039;s embedded interpreter. This can happen, for instance, if your OS is ArchLinux. System-wide Python will be the latest version available (say, 3.13), whereas Blender interpreter will be an older one (for instance, 3.11).&lt;br /&gt;
&lt;br /&gt;
If you build a test wheel without precaution, the tag will be the one of your system-wide Python and, when you try to install it in Blender, _the embedded interpreter will prevent you to do so (or will prevent you to import the lib)_.&lt;br /&gt;
&lt;br /&gt;
The most simple workaround consists in using &amp;lt;code&amp;gt;pyenv&amp;lt;/code&amp;gt; to set the right interpreter in your build session. Be careful to clear and reconfigure the whole project, afterwards: &amp;lt;pre&amp;gt;make clear &amp;amp;&amp;amp; make deps&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once rebuilt, please check the version of pyluxcore in the build log:&lt;br /&gt;
&amp;lt;code&amp;gt;LuxCore/out/install/Debug/pyluxcore/pyluxcore.cpython-&amp;lt;version&amp;gt;-x86_64-linux-gnu.so&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;version&amp;gt; should match with the embedded interpreter.&lt;br /&gt;
&lt;br /&gt;
Another point to be cautious about, in the present case: if pyluxcore is already installed system-wide, for a different version of Python than Blender, then Blender will fail installing the wheel. In this case, you&amp;#039;ll have to uninstall your system-wide pyluxcore (&amp;lt;code&amp;gt;pip uninstall pyluxcore&amp;lt;/code&amp;gt;) if you want Blender to install correctly.&lt;br /&gt;
&lt;br /&gt;
== Message &amp;quot;[BLC] skipping pyluxcore installation. Custom wheel matching hash already installed.&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
If you think this message is irrelevant, clean the following file: &amp;lt;code&amp;gt;$HOME/.config/blender/4.2/extensions/.user/user_default/BlendLuxCore/pyluxcore_installation_info.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging the wheel executing in Blender (Linux) ==&lt;br /&gt;
&lt;br /&gt;
It is possible to debug the wheel when it is executed in Blender. To do so, follow the procedure below:&lt;br /&gt;
* Build the wheel in debug mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;export LUX_BUILD_TYPE=Debug&lt;br /&gt;
make wheel-test&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run Blender with gdb&lt;br /&gt;
&amp;lt;pre&amp;gt;gdb --args blender&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(nota bene: check that the latest wheel is correctly installed by BlendLuxCore)&lt;br /&gt;
&lt;br /&gt;
gdb should allow you to debug any call to LuxCore&lt;/div&gt;</summary>
		<author><name>CodeHD</name></author>
	</entry>
</feed>