Skip to content

bpy_jupyter

bpy_jupyter

An extension that embeds a Jupyter kernel within Blender.

ATTRIBUTE DESCRIPTION
BL_REGISTER

All Blender classes that should be registered by register().

TYPE: list[type[BLClass]]

register

register() -> None

Registers this addon, so that its functionality is available in Blender.

Notes

Called by Blender when enabling this addon.

Uses bpy_jupyter.registration.register_classes() to register all classes collected in BL_REGISTER.

Source code in bpy_jupyter/__init__.py
40
41
42
43
44
45
46
47
48
def register() -> None:
	"""Registers this addon, so that its functionality is available in Blender.

	Notes:
		Called by Blender when enabling this addon.

		Uses `bpy_jupyter.registration.register_classes()` to register all classes collected in `BL_REGISTER`.
	"""
	registration.register_classes(BL_REGISTER)

unregister

unregister() -> None

Unregisters this addon, so that its functionality is no longer available in Blender.

Notes

Run by Blender when disabling and/or uninstalling the addon.

Uses bpy_jupyter.registration.unregister_classes() to unregister all Blender classes previously registered by this addon.

Source code in bpy_jupyter/__init__.py
51
52
53
54
55
56
57
58
59
def unregister() -> None:
	"""Unregisters this addon, so that its functionality is no longer available in Blender.

	Notes:
		Run by Blender when disabling and/or uninstalling the addon.

		Uses `bpy_jupyter.registration.unregister_classes()` to unregister all Blender classes previously registered by this addon.
	"""
	registration.unregister_classes()

bpy_jupyter.preferences

Addon preferences, encapsulating the various global modifications that the user may make to how this addon functions.

ATTRIBUTE DESCRIPTION
BL_REGISTER

All Blender classes from this module that should be registered.

BPYJupyterAddonPrefs

Bases: AddonPreferences

Manages user preferences and settings for this addon.

ATTRIBUTE DESCRIPTION
bl_idname

Matches __package__.

TYPE: str


bpy_jupyter.types

Types, enums and constants for use throughout this extension.

ATTRIBUTE DESCRIPTION
BLClass

A Blender class in bpy.types that can be registered.

TYPE: TypeAlias

BLContextType

A possible value for bl_context in bpy.types.Panel types.

TYPE: TypeAlias

PATH_MANIFEST

Path to this addon's blender_manifest.toml file.

TYPE: Path

MANIFEST

This addon's blender_manifest.toml as a dictionary.

TYPE: dict[str, Any]

EXT_NAME

Name of this extension.

TYPE: str

EXT_PACKAGE

Value of __package__ on the top level of this extension.

TYPE: str

PANEL_TYPE_PREFIX

Extension-specific prefix to use for all values in PanelType.

References

OperatorType

Bases: StrEnum

bl_idname values for all addon-defined bpy.types.Operators.

ATTRIBUTE DESCRIPTION
StartJupyterKernel

Starts an embedded Jupyter kernel, using bpy_jupyter.services.jupyter_kernel.

  • Also starts an asyncio event loop, using bpy_jupyter.services.async_event_loop.

StopJupyterKernel

Stops the embedded Jupyter kernel, using bpy_jupyter.services.jupyter_kernel.

  • Also stops the active asyncio event loop, using bpy_jupyter.services.async_event_loop.

CopyKernelInfoToClipboard

Copies some string whose value depends on a running Jupyter kernel, to the system clipboard.

PanelType

Bases: StrEnum

bl_idname values for all addon-defined bpy.types.Panels.

ATTRIBUTE DESCRIPTION
JupyterPanel

The Properties -> Scene panel that allows managing the embedded Jupyter kernel.