{"id":18420679,"url":"https://github.com/openworm/blender2neuroml","last_synced_at":"2025-04-07T13:32:19.737Z","repository":{"id":10603090,"uuid":"12818923","full_name":"openworm/Blender2NeuroML","owner":"openworm","description":"Conversion script to bring neuron models created in Blender into NeuroML format","archived":false,"fork":false,"pushed_at":"2023-05-16T15:56:10.000Z","size":475071,"stargazers_count":18,"open_issues_count":2,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-22T19:43:19.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"nrenner/leaflet-tilelayer-vector","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openworm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-13T20:40:10.000Z","updated_at":"2024-10-09T01:10:39.000Z","dependencies_parsed_at":"2024-11-06T04:36:52.712Z","dependency_job_id":null,"html_url":"https://github.com/openworm/Blender2NeuroML","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2FBlender2NeuroML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2FBlender2NeuroML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2FBlender2NeuroML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openworm%2FBlender2NeuroML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openworm","download_url":"https://codeload.github.com/openworm/Blender2NeuroML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661921,"owners_count":20975148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:22:39.953Z","updated_at":"2025-04-07T13:32:14.729Z","avatar_url":"https://github.com/openworm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Blender2NeuroML\n===============\n\nConversion scripts to convert \u003ci\u003eC. elegans\u003c/i\u003e 3D neural models created in Blender into NeuroML format.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/openworm/Blender2NeuroML/raw/master/images/Blender_ADAL.png\" height=\"230\"/\u003e\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"https://github.com/openworm/Blender2NeuroML/raw/master/images/ADAL.png\" height=\"230\"/\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003csup\u003e\u003ci\u003eFigure showing a single cell (\u003ca href=\"https://www.wormatlas.org/neurons/Individual%20Neurons/ADAframeset.html\"\u003eADAL\u003c/a\u003e) highlighted in orange in the original\n\u003ca href=\"https://github.com/openworm/Blender2NeuroML/blob/master/src/Data/Virtual_Worm_March_2011.blend\"\u003e3D Blender file\u003c/a\u003e (from the\n\u003ca href=\"http://caltech.wormbase.org/virtualworm\"\u003eVirtual Worm Project\u003c/a\u003e) on the left, and corresponding images of the cell on its own in Blender (middle 2 panels) and in\n\u003ca href=\"https://docs.neuroml.org/Userdocs/NeuroMLv2.html\"\u003eNeuroML 2\u003c/a\u003e format (right 2 panels). The NeuroML version is being used in our\n\u003ca href=\"https://github.com/openworm/c302\"\u003ebiophysical model of the worm nervous system\u003c/a\u003e. See\n\u003ca href=\"https://github.com/openworm/Blender2NeuroML/blob/master/src/NeuroMLImages/README.md\"\u003ehere\u003c/a\u003e for more examples.\u003c/i\u003e\u003c/sup\u003e\u003c/p\u003e\n\n\n**Update 2022: the scripts below have been rechecked and tested in Python 3**\n\n  1. [CheckWrlFile.py](src/CheckWrlFile.py) - compare WRL file [Virtual_Worm_March_2011.wrl](src/Data/Virtual_Worm_March_2011.wrl) with [302.ods](src/Data/302.ods) and [NeuronConnect.xls](src/Data/NeuronConnect.xls).\n     It finds neurons which are in 302.ods and NeuronConnect.xls but aren't in [Virtual_Worm_March_2011.wrl](src/Data/Virtual_Worm_March_2011.wrl). Output of scripts prints\n     to console. Before you run it you'll need to install xlrd. Type: `pip install xlrd`\n  2. [WrlToNeuroML.py](src/WrlToNeuroML.py) - create NeuroML files from WRL file [Virtual_Worm_March_2011.wrl](src/Data/Virtual_Worm_March_2011.wrl) for neurons listed in the [neurons.txt](/src/Data/neurons.txt) file. This script takes data from the [Data folder](src/Data) and creates one NeuroML file in folder [Output](src/Output).\n\n**Update 2022: the following is still being updated/tested**\n\n  3. blenderToNeuroMl.py - create morphoMl form blender file for all mottor neurons from Virtual_Worm_March_2011.blend\n     (should located in folder 'path to your blender\\.blender\\').\n     For run you should do in eclipse this:\n       \"Run-\u003eExternal Tools-\u003eExternal Tools...\" with the following settings:\n        Main-Tab:\n        Location: blender executable\n        Working directory: blender executable directory\n        Arguments:-b \"path to file Virtual_Worm_March_2011.blend\" -w -P ${resource_loc}\n        Environment-Tab:\n        Variable: PYTHONPATH\n        Value: ${container_loc}\n        and choose \"Append environment to native environment\"\n     Also you need in your blender folder create folder with name Output there are will be save output file.\n  4. blenderStraighten.py - edit blender file, straightening the worm body; see the file header for details.\n  5. blenderExportSpine.py - export spine information from the Blender model (e.g. for NeuroML transformation); see the file header for details.\n\nIf you have any problem will be glad to help\nwrite s.khayrulin@gmail.com or openworm-discuss@googlegroups.com\n\n\nFor some scripts (like blenderToNeuroMl.py) you need to run them in the Blender Scripting console.\n\nTo Run Python Scripts in the Blender Console:\n1. Install Blender\n2. Click on the Scripting Workspace Tab near the top right/middle\n3. Under the text editor, click the folder icon that says \"Open\"\n4. Navigate to your Python Script\n5. Push the play button to run the script\nThere likely will be errors.\nTo view the Blender console click on \"Window\" near the top left and click \"Toggle System Console\"\nFor 3rd party module import errors, remember that Blender uses its own install of Python-\nYou will need to get Blender to install those modules to its own internal Python.\n\nTo Install 3rd Party Modules to Blender's Internal Python:\n1. Follow the above instructions and open the installDependencies.py in Blender\n2. Run the script. (Blender needs to be open as admin (at least on Windows))\n3. Go for a walk. It might take a bit.\n\nTIPS ABOUT RUNNING SCRIPTS IN BLENDER(3.0.1):\nEditing a script:\nIt can be kind of annoying. If you edit a script, in your IDE and save, Blender will not autoupdate the script.\nReload the script by clicking the \"Text\" tab (on the \"Text Editor\" workspace) and then click reload. (Hotkey: ALT+R)\nIf you edit a dependency/module of the main script you're loading, then even reopening the script won't work.\nYou need to completely close and reopen Blender for it to update. (If you find a workaround, delete this and write it.)\n\nMaking scripting less annoying:\nYou can install a fake bpy module to make it so your linter (I use VScode) recognizes your bpy module.\nTo install this module just call \"pip install fake-bpy-module-2.82\"\n\nCrashing:\nSometimes it will just crash.\nMy most frequent cause of crashing is Blender's internal version of Python reaching for things on the OS (Windows)\nthat it doesn't have permission to.\nThat is why I reccomend opening Blender as admin ('shift + rightclick' the program).\nI know it's not the best practice, but it's either that or you have to copy\nall of your scripts into the correct folder of the Blender install.\n(Even if you did do that, the default install location for Blender on Windows is not on the User's folder.\nSo you need admin permissions to use the OS or SYS modules or edit files there anyways.\n[The whole point of the conversion scripts is to edit files.]\nIt's a mess. So, if you really care about security on Windows, just run Blender portably or\nreinstall Blender in the User's folder...\nIt's almost like Blender wasn't designed for our use case...\nBut then again, if you find a better way to do this, delete my bad advice please.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenworm%2Fblender2neuroml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenworm%2Fblender2neuroml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenworm%2Fblender2neuroml/lists"}