Skip to content

Commit

Permalink
plotting: accept trimeshes directly
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Oct 14, 2020
1 parent c1e8af6 commit 2d75b0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion navis/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d75b0c

Please sign in to comment.