diff --git a/brainrender/_jupyter.py b/brainrender/_jupyter.py index 93e5c84..1fb632a 100644 --- a/brainrender/_jupyter.py +++ b/brainrender/_jupyter.py @@ -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