1
$\begingroup$

Easy question with probably no easy answer: How can I open a blend file just like e.g. a txt or a python file?

I'm not simply interested in the objects of the scene (like here), but the full -let's say- architecture of the script. I had a look at blender-aid and the DNA Exporter, but I couldn't figure out how to use it or rather don't think they are what I'm looking for.

Please be patient, I'm completely new to Blender.

$\endgroup$
3
$\begingroup$

Blender has a fairly complex system of storing its data using (RNA and DNA). It also stores a vast set of different types of data (colors, textures, assets, images, fonts, objects, modifiers, settings,...). I'd like to think of a blend file as a zip archive with a nested set of directories and files underneath it. But it isn't actually a zip.

What kind of data are you exactly looking for? Lets assume that you are looking for the shape of the objects inside of a blend file. then you could make a python scripts that goes through all objects of bpy.data.objects as ob for instance. You could then find the geometry the object is composed by using ob.data which usually will result in an entry from bpy.data.meshes.

You can than use this to dump its vertices: How to iterate through all vertices of an object that contains multiple meshes?

$\endgroup$
1
  • $\begingroup$ Thanks for clarifying the blend structure! I'm probably most interested in the object and its details (position, shape, texture) as well as the camera and lightning infos. $\endgroup$ Jul 27 '20 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.