Skip to content

Commit d12b7e3

Browse files
committed
added better readme
1 parent 0152fc0 commit d12b7e3

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,39 @@
1-
# blender_ipython
1+
# Blender Notebook
2+
3+
A simple command line tool to wrap blender 2.8+ as a jupyter kernel.
4+
5+
Blender's python API requires its embedded python interpreter. As of Blender 2.82, python 3.7 is packaged. In order to make ipykernel and other pip packages accessible to Blender, the `site-packages` directory of the python interpreter executing blender_notebook will be added to Blender's python path. Therefore, it's highly recommended to use exactly the same python version as your blender.
6+
7+
## Installation
8+
9+
The easiest way to install blender_notebook is via pip:
10+
```
11+
$ python -m pip install blender_notebook
12+
```
13+
14+
It can also be installed from source:
15+
```
16+
$ python -m pip install -e .
17+
```
18+
19+
## Usage
20+
21+
If blender in installed by a package manager, the easiest way to find the executable path is:
22+
```
23+
$ which blender
24+
/snap/bin/blender
25+
```
26+
In my case, blender is installed from snap.
27+
28+
Then, run the blender_notebook CLI:
29+
```
30+
$ blender_notebook install --blender-exec /snap/bin/blender
31+
Saving files to ~/.local/share/jupyter/kernels/blender
32+
```
33+
34+
You can also delete the kernel:
35+
```
36+
$ blender_notebook remove
37+
Are you sure to delete ~/.local/share/jupyter/kernels/blender ? [y/N]: y
38+
blender jupyter kernel is removed!
39+
```

blender_notebook/installer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def install(blender_exec, kernel_dir, kernel_name):
5555
raise RuntimeError("Invalid blender executable path!")
5656

5757
kernel_path = get_kernel_path(kernel_dir)
58-
print(kernel_path)
5958

6059
kernel_install_path = kernel_path.joinpath(kernel_name)
6160
if kernel_install_path.exists():

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
from setuptools import setup
2+
import pathlib
3+
with pathlib.Path(__file__).parent.joinpath('README.md').open('r', encoding='utf-8') as f:
4+
long_description = f.read()
25

36
setup(
47
name = "blender_notebook",
58
version = "0.0.1",
6-
description = "Script to wrap blender as a jupyter kernel",
9+
description = "A simple command line tool to wrap blender 2.8+ as a jupyter kernel",
10+
long_description = long_description,
11+
long_description_content_type = 'text/markdown',
712
author = "Cheng Chi",
813
author_email = "[email protected]",
914
license = "MIT",

0 commit comments

Comments
 (0)