Skip to content

Commit 154a293

Browse files
committed
Deployed a877aae with MkDocs version: 1.6.1
1 parent a303975 commit 154a293

File tree

4 files changed

+131
-118
lines changed

4 files changed

+131
-118
lines changed

n0getting_started/index.html

+62-85
Original file line numberDiff line numberDiff line change
@@ -302,33 +302,6 @@
302302
</span>
303303
</a>
304304

305-
</li>
306-
307-
<li class="md-nav__item">
308-
<a href="#python-package-manger-uv" class="md-nav__link">
309-
<span class="md-ellipsis">
310-
Python Package manger UV
311-
</span>
312-
</a>
313-
314-
</li>
315-
316-
<li class="md-nav__item">
317-
<a href="#using-headless-mode" class="md-nav__link">
318-
<span class="md-ellipsis">
319-
Using Headless Mode
320-
</span>
321-
</a>
322-
323-
</li>
324-
325-
<li class="md-nav__item">
326-
<a href="#using-gui-mode" class="md-nav__link">
327-
<span class="md-ellipsis">
328-
Using GUI Mode
329-
</span>
330-
</a>
331-
332305
</li>
333306

334307
</ul>
@@ -477,33 +450,6 @@
477450
</span>
478451
</a>
479452

480-
</li>
481-
482-
<li class="md-nav__item">
483-
<a href="#python-package-manger-uv" class="md-nav__link">
484-
<span class="md-ellipsis">
485-
Python Package manger UV
486-
</span>
487-
</a>
488-
489-
</li>
490-
491-
<li class="md-nav__item">
492-
<a href="#using-headless-mode" class="md-nav__link">
493-
<span class="md-ellipsis">
494-
Using Headless Mode
495-
</span>
496-
</a>
497-
498-
</li>
499-
500-
<li class="md-nav__item">
501-
<a href="#using-gui-mode" class="md-nav__link">
502-
<span class="md-ellipsis">
503-
Using GUI Mode
504-
</span>
505-
</a>
506-
507453
</li>
508454

509455
</ul>
@@ -530,44 +476,75 @@ <h2 id="how-can-i-use-blender-with-python">How can I use Blender with Python?</h
530476
<li>Headless Mode: In this mode, you install the Blender Python module bpy from PyPi. The Blender GUI doesn’t open, so you can run it even without a Blender installation. </li>
531477
<li>GUI Mode: This mode uses your installed Blender version, so you can work in the Blender GUI while sending commands from the notebook.</li>
532478
</ol>
533-
<h2 id="python-package-manger-uv">Python Package manger UV</h2>
534-
<p>For the installation, we use the package manager <a href="https://docs.astral.sh/uv/getting-started/installation/">uv</a>.</p>
535-
<p>The advantage of <code>uv</code> is that it automatically manages and caches your environment. You can run the same command multiple times without needing virtual environments or handling Python installations manually.</p>
536-
<p>Installation <strong>macOS</strong>:
537-
<code>curl -LsSf https://astral.sh/uv/install.sh | sh</code></p>
538-
<p>Installation <strong>Windows</strong>:
539-
<code>powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"</code></p>
540-
<h2 id="using-headless-mode">Using Headless Mode</h2>
541-
<p>To start the notebook, run:
542-
<code>uvx --python 3.11 --with bpy==4.2.0 jupyter lab</code></p>
543-
<p><img alt="alt text" src="../first_render.png" /></p>
544-
<details class="code">
545-
<summary>Code</summary>
546-
<div class="language-py highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="kn">import</span><span class="w"> </span><span class="nn">bpy</span>
479+
<h1 id="work-in-progress">WORK IN PROGRESS.</h1>
480+
<p>Probably in March 2025 there will be a new guide on how to use Blender w. Jupyter.
481+
Till then, here's the repo for further installation instructions: https://github.com/Octoframes/bpy_jupyter</p>
482+
<!-- ## Python Package manger UV
483+
484+
For the installation, we use the package manager [uv](https://docs.astral.sh/uv/getting-started/installation/).
485+
486+
The advantage of `uv` is that it automatically manages and caches your environment. You can run the same command multiple times without needing virtual environments or handling Python installations manually.
487+
488+
489+
Installation **macOS**:
490+
`curl -LsSf https://astral.sh/uv/install.sh | sh`
491+
492+
493+
Installation **Windows**:
494+
`powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"`
495+
496+
497+
498+
## Using Headless Mode
499+
500+
501+
To start the notebook, run:
502+
`uvx --python 3.11 --with bpy==4.2.0 jupyter lab`
503+
504+
![alt text](first_render.png)
505+
506+
507+
??? Code
508+
509+
<div class="language-py highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="kn">import</span><span class="w"> </span><span class="nn">bpy</span>
547510
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="kn">from</span><span class="w"> </span><span class="nn">IPython.display</span><span class="w"> </span><span class="kn">import</span> <span class="n">display</span><span class="p">,</span> <span class="n">Image</span>
548511
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="n">bpy</span><span class="o">.</span><span class="n">ops</span><span class="o">.</span><span class="n">render</span><span class="o">.</span><span class="n">render</span><span class="p">()</span>
549512
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="n">bpy</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">images</span><span class="p">[</span><span class="s2">&quot;Render Result&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">save_render</span><span class="p">(</span><span class="n">filepath</span><span class="o">=</span><span class="s2">&quot;img.png&quot;</span><span class="p">)</span>
550513
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="n">display</span><span class="p">(</span><span class="n">Image</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s2">&quot;img.png&quot;</span><span class="p">))</span>
551514
</span></code></pre></div>
552-
</details>
553-
<p><strong>Note:</strong> The headless mode will <em>only</em> run with Python 3.11 (as of Blender 4.2).</p>
554-
<h2 id="using-gui-mode">Using GUI Mode</h2>
555-
<p>To set up Blender in GUI mode, we first register the Blender kernel with your notebook environment.</p>
556-
<p>On <strong>macOS</strong>, run:<br />
557-
<code>uvx blender_notebook install --blender-exec="/Applications/Blender.app/Contents/MacOS/Blender"</code></p>
558-
<p><code>uvx --python 3.11 jupyter lab</code></p>
559-
<p>(under the hood, this is using <a href="https://github.com/cheng-chi/blender_notebook">blender_notebook</a>)</p>
560-
<p>On <strong>Windows</strong>, run:<br />
561-
<code>uvx blender_notebook install --blender-exec="C:\Program Files\Blender Foundation\Blender 4.2\blender.exe"</code></p>
562-
<p><code>uvx --python 3.11 jupyter lab</code>
563-
(Windows installation is not yet tested)</p>
564-
<p>Once set up, you can select the Blender kernel in Jupyter Lab.</p>
565-
<p>Select the Blender kernel in <strong>JupyterLab</strong> like this:</p>
515+
516+
**Note:** The headless mode will *only* run with Python 3.11 (as of Blender 4.2).
517+
518+
## Using GUI Mode
519+
520+
To set up Blender in GUI mode, we first register the Blender kernel with your notebook environment.
521+
522+
523+
524+
On **macOS**, run:
525+
`uvx blender_notebook install --blender-exec="/Applications/Blender.app/Contents/MacOS/Blender"`
526+
527+
`uvx --python 3.11 jupyter lab`
528+
529+
(under the hood, this is using [blender_notebook](https://github.com/cheng-chi/blender_notebook))
530+
531+
On **Windows**, run:
532+
`uvx blender_notebook install --blender-exec="C:\Program Files\Blender Foundation\Blender 4.2\blender.exe"`
533+
534+
`uvx --python 3.11 jupyter lab`
535+
(Windows installation is not yet tested)
536+
537+
Once set up, you can select the Blender kernel in Jupyter Lab.
538+
539+
Select the Blender kernel in **JupyterLab** like this:
566540
<video controls src="../jupyterlab_setup.mp4" title="Title"></video>
567541
568-
<p><strong>Note</strong>: GUI mode also works with other notebook environments, such as VS Code notebooks and Satyrn notebooks.</p>
569-
<p>Select the Blender kernel in <strong>VS Code</strong> like this:</p>
570-
<video controls src="../vscode_setup.mp4" title="Title"></video>
542+
543+
**Note**: GUI mode also works with other notebook environments, such as VS Code notebooks and Satyrn notebooks.
544+
545+
546+
Select the Blender kernel in **VS Code** like this:
547+
<video controls src="../vscode_setup.mp4" title="Title"></video> -->
571548

572549

573550

n2typst_examples/index.html

+63-27
Large diffs are not rendered by default.

render_utils/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ <h1>Render utils</h1>
829829
<!-- End of mermaid configuration --><div class="jupyter-wrapper">
830830
<div class="jp-Notebook" data-jp-theme-light="true" data-jp-theme-name="JupyterLab Light">
831831
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs">
832-
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=76b3b016">
832+
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=4b62ee9f">
833833
<div class="jp-Cell-inputWrapper" tabindex="0">
834834
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
835835
</div>
@@ -866,7 +866,7 @@ <h1>Render utils</h1>
866866
</div>
867867
</div>
868868
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs">
869-
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=d386d032">
869+
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=04ad6f04">
870870
<div class="jp-Cell-inputWrapper" tabindex="0">
871871
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
872872
</div>
@@ -911,7 +911,7 @@ <h1>Render utils</h1>
911911
</div>
912912
</div>
913913
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs">
914-
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=c297f336">
914+
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=4e66c2f0">
915915
<div class="jp-Cell-inputWrapper" tabindex="0">
916916
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
917917
</div>
@@ -978,7 +978,7 @@ <h1>Render utils</h1>
978978
</div>
979979
</div>
980980
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs">
981-
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=22b5219e">
981+
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=ec18ace2">
982982
<div class="jp-Cell-inputWrapper" tabindex="0">
983983
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
984984
</div>
@@ -1021,7 +1021,7 @@ <h1>Render utils</h1>
10211021
</div>
10221022
</div>
10231023
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs">
1024-
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=d2a1dfb2">
1024+
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs" id="cell-id=64e06c97">
10251025
<div class="jp-Cell-inputWrapper" tabindex="0">
10261026
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
10271027
</div>

search/search_index.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)