From 2d75b0c3872c821352305bda8a73aef3656b6dd1 Mon Sep 17 00:00:00 2001 From: Philipp Schlegel Date: Wed, 14 Oct 2020 16:42:21 +0100 Subject: [PATCH] plotting: accept trimeshes directly --- navis/utils/misc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/navis/utils/misc.py b/navis/utils/misc.py index c57875c6..2325eb34 100644 --- a/navis/utils/misc.py +++ b/navis/utils/misc.py @@ -301,7 +301,9 @@ def parse_objects(x) -> Tuple['core.NeuronList', dotprops = pd.concat(dps) # Collect and parse volumes - volumes = [ob for ob in x if isinstance(ob, core.Volume)] + volumes = [ob for ob in x if isinstance(ob, tm.Trimesh)] + # Converts trimeshes into Volumes + volumes = [core.Volume(v) if not isinstance(v, core.Volume) else v for v in volumes] # Collect dataframes with X/Y/Z coordinates # Note: dotprops and volumes are instances of pd.DataFrames