Skip to content

Commit 62a434f

Browse files
AdityaGupta716IgorTatarnikovpre-commit-ci[bot]
authored
fix: replace removed embedWindow with correct vedo backend instructions (#437)
Co-authored-by: Igor Tatarnikov <61896994+IgorTatarnikov@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f006213 commit 62a434f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

brainrender/_jupyter.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ def __call__(self, obj, *args, **kwargs): # pragma: no cover
4343
return self.func(obj, *args, **kwargs)
4444
else:
4545
print(
46-
f"[{orange_dark}]Cannot run function [bold {salmon}]{self.func.__name__}[/ bold {salmon}] in a jupyter notebook",
47-
f"[{orange_dark}]Try setting the correct backend before creating your scene:\n",
48-
Syntax("from vedo import embedWindow", lexer="python"),
49-
Syntax("embedWindow(None)", lexer="python"),
46+
f"[{orange_dark}]Cannot run function [bold {salmon}]{self.func.__name__}[/bold {salmon}] in a jupyter notebook.",
47+
f"[{orange_dark}]To use brainrender in a Jupyter notebook, set the vedo backend to 'k3d' before creating your scene:\n",
48+
Syntax("import vedo", lexer="python"),
49+
Syntax(
50+
"vedo.settings.default_backend = 'k3d'", lexer="python"
51+
),
52+
f"\n[{orange_dark}]Note: some features are not available in the k3d backend.",
53+
f"[{orange_dark}]To use all features, run brainrender in a standard Python script or interactive terminal instead.",
5054
)
5155
return None

0 commit comments

Comments
 (0)