JustasB / BlenderNEURON

Exports 3D structure and activity from NEURON simulator to Blender
http://blenderNEURON.org
MIT License
27 stars 7 forks source link

Handle long cell/section names #15

Open Helveg opened 3 years ago

Helveg commented 3 years ago

Steps to reproduce:

image

Helveg commented 3 years ago

When I try to create a minimally reproducible example I can in fact import the cell groups if I directly use Import3D.

JustasB commented 3 years ago

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.

  1. 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
  2. Instantiate the cell using the dummy class, e.g. pc = PurkinjeCellDummy()
  3. Start BlenderNEURON in NEURON with from blenderneuron import neuronstart and import the group

I get this with the above steps:

image

JustasB commented 3 years ago

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.

image

Helveg commented 3 years ago

Great news! Thanks for the workaround, I can continue playing around now!