Skip to main content
replaced http://blender.stackexchange.com/ with https://blender.stackexchange.com/
Source Link

While it is possible, using blender will be much easier. A small scriptA small script that you pass to blender when run from a cli is small and easy to maintain. From another python script you could automate it with -

from subprocess import call
call(['blender','-b','file.blend','-P','script.py'])

You can even have your script generate the small temporary script that gets passed to blender.

However if you really have a need to not require blender to be installed, you may want to look at an old project that appears to have died off called blender-aid, it provided a web interface to blend files and used a python script to access data in the blend file, it was intended to assist project management and allowed file links to be repaired and/or re-factored, so apart from reading a blend file it could also write changes to them. While the full info of reading a blend file is contained within blender's source code, you may be able to get a start with blender-aid's old script here - or at least it will give you an idea of how much code is needed.

While it is possible, using blender will be much easier. A small script that you pass to blender when run from a cli is small and easy to maintain. From another python script you could automate it with -

from subprocess import call
call(['blender','-b','file.blend','-P','script.py'])

You can even have your script generate the small temporary script that gets passed to blender.

However if you really have a need to not require blender to be installed, you may want to look at an old project that appears to have died off called blender-aid, it provided a web interface to blend files and used a python script to access data in the blend file, it was intended to assist project management and allowed file links to be repaired and/or re-factored, so apart from reading a blend file it could also write changes to them. While the full info of reading a blend file is contained within blender's source code, you may be able to get a start with blender-aid's old script here - or at least it will give you an idea of how much code is needed.

While it is possible, using blender will be much easier. A small script that you pass to blender when run from a cli is small and easy to maintain. From another python script you could automate it with -

from subprocess import call
call(['blender','-b','file.blend','-P','script.py'])

You can even have your script generate the small temporary script that gets passed to blender.

However if you really have a need to not require blender to be installed, you may want to look at an old project that appears to have died off called blender-aid, it provided a web interface to blend files and used a python script to access data in the blend file, it was intended to assist project management and allowed file links to be repaired and/or re-factored, so apart from reading a blend file it could also write changes to them. While the full info of reading a blend file is contained within blender's source code, you may be able to get a start with blender-aid's old script here - or at least it will give you an idea of how much code is needed.

fix incorrect link added by mistake
Source Link
sambler
  • 55.8k
  • 3
  • 62
  • 193

While it is possible, using blender will be much easier. A small script that you pass to blender when run from a cli is small and easy to maintain. From another python script you could automate it with -

from subprocess import call
call(['blender','-b','file.blend','-P','script.py'])

You can even have your script generate the small temporary script that gets passed to blender.

However if you really have a need to not require blender to be installed, you may want to look at an old project that appears to have died off called blender-aid, it provided a web interface to blend files and used a python script to access data in the blend file, it was intended to assist project management and allowed file links to be repaired and/or re-factored, so apart from reading a blend file it could also write changes to them. While the full info of reading a blend file is contained within blender's source code, you may be able to get a start with blender-aid's old script hereold script here - or at least it will give you an idea of how much code is needed.

While it is possible, using blender will be much easier. A small script that you pass to blender when run from a cli is small and easy to maintain. From another python script you could automate it with -

from subprocess import call
call(['blender','-b','file.blend','-P','script.py'])

You can even have your script generate the small temporary script that gets passed to blender.

However if you really have a need to not require blender to be installed, you may want to look at an old project that appears to have died off called blender-aid, it provided a web interface to blend files and used a python script to access data in the blend file, it was intended to assist project management and allowed file links to be repaired and/or re-factored, so apart from reading a blend file it could also write changes to them. While the full info of reading a blend file is contained within blender's source code, you may be able to get a start with blender-aid's old script here - or at least it will give you an idea of how much code is needed.

While it is possible, using blender will be much easier. A small script that you pass to blender when run from a cli is small and easy to maintain. From another python script you could automate it with -

from subprocess import call
call(['blender','-b','file.blend','-P','script.py'])

You can even have your script generate the small temporary script that gets passed to blender.

However if you really have a need to not require blender to be installed, you may want to look at an old project that appears to have died off called blender-aid, it provided a web interface to blend files and used a python script to access data in the blend file, it was intended to assist project management and allowed file links to be repaired and/or re-factored, so apart from reading a blend file it could also write changes to them. While the full info of reading a blend file is contained within blender's source code, you may be able to get a start with blender-aid's old script here - or at least it will give you an idea of how much code is needed.

Source Link
sambler
  • 55.8k
  • 3
  • 62
  • 193

While it is possible, using blender will be much easier. A small script that you pass to blender when run from a cli is small and easy to maintain. From another python script you could automate it with -

from subprocess import call
call(['blender','-b','file.blend','-P','script.py'])

You can even have your script generate the small temporary script that gets passed to blender.

However if you really have a need to not require blender to be installed, you may want to look at an old project that appears to have died off called blender-aid, it provided a web interface to blend files and used a python script to access data in the blend file, it was intended to assist project management and allowed file links to be repaired and/or re-factored, so apart from reading a blend file it could also write changes to them. While the full info of reading a blend file is contained within blender's source code, you may be able to get a start with blender-aid's old script here - or at least it will give you an idea of how much code is needed.