BlenderNEURON
BlenderNEURON copied to clipboard
Handle long cell/section names
Steps to reproduce:
-
pip install dbbs-models
- Open a Python shell
> from dbbs_models import PurkinjeCell
# Basically uses Import3D to load an ASC morphology file
> pc = PurkinjeCell()
> from blenderneuron import neuronstart
- Open Blender, select the soma section in the cell group objects, press "Import Cell Groups to Blender"
When I try to create a minimally reproducible example I can in fact import the cell groups if I directly use Import3D.
Hi @Helveg,
Thanks for reporting the issue -- I was able to reproduce it.
The underlying cause is the limit on the length of blender object names. I will work on a long term fix, but I found a workaround that you could use in the meantime.
- Create a dummy class that wraps one of the dbbs cell classes (this shortens the name of the cell in Blender), e.g.:
import dbbs_models
class PurkinjeCellDummy(dbbs_models.purkinje_cell_models.PurkinjeCell): pass
- Instantiate the cell using the dummy class, e.g.
pc = PurkinjeCellDummy()
- Start BlenderNEURON in NEURON with
from blenderneuron import neuronstart
and import the group
I get this with the above steps:
Without looking closer at the morphology points, I'm not sure if those are an issue with BN or the morphology. I noticed that if the 'Interact with Sections' option is used, the lines dissapear.
Great news! Thanks for the workaround, I can continue playing around now!