Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions brainrender/_jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ def __call__(self, obj, *args, **kwargs): # pragma: no cover
return self.func(obj, *args, **kwargs)
else:
print(
f"[{orange_dark}]Cannot run function [bold {salmon}]{self.func.__name__}[/ bold {salmon}] in a jupyter notebook",
f"[{orange_dark}]Try setting the correct backend before creating your scene:\n",
Syntax("from vedo import embedWindow", lexer="python"),
Syntax("embedWindow(None)", lexer="python"),
f"[{orange_dark}]Cannot run function [bold {salmon}]{self.func.__name__}[/bold {salmon}] in a jupyter notebook.",
f"[{orange_dark}]To use brainrender in a Jupyter notebook, set the vedo backend to 'k3d' before creating your scene:\n",
Syntax("import vedo", lexer="python"),
Syntax(
"vedo.settings.default_backend = 'k3d'", lexer="python"
),
f"\n[{orange_dark}]Note: some features are not available in the k3d backend.",
f"[{orange_dark}]To use all features, run brainrender in a standard Python script or interactive terminal instead.",
)
return None
Loading