Generate a list of Blender object information

This isn't the next killer add-on you must have, but it could prove useful if you find yourself like me in the following situation: You are working on a high poly model consisting of dozens of different meshes and at some point you need to start thinking about your polygon budget.

So you want to focus on the meshes with the largest number of tris first, but determining how many tris there are requires selecting each individual object and switching to edit mode to see the data.

Also, at some point you may want to have a checklist of all objects to verify if you unwrapped them, retopologized them or whatever, before you start moving them to an external paint program for example, so a list of objects can be convenient to keep things organized.

object_list.py


I am a coder with a bit of a list obsession, so I created a small add-on that creates a comma separated list of objects with the most common properties for those objects. The list is created as a text block in the built-in editor. Such a list is then easily copied to a spreadsheet if you like, an example is shown below:



Note that the numbers listed are for the render time object with all modifiers applied (which is especially important for subdivision modifiers). Those numbers are only calculated for meshes: I would love to do this for beveled curves as well but I didn't figure out how to do that yet.

Code


The add-on is available from my GitHub repository. Simply use this direct link to download the file object_list.py and then install it with Edit > Preferences > Addons ... in the usual manner.

Once enabled it will be available in the Object menu of the 3D viewport. For large scenese with large meshes it can potentially take quite some time depending on the power of your computer.

The list of info is stored in a Text block called Object list.csv.



8 comments:

  1. Could you update it to 3.0.0 please? :)

    ReplyDelete
  2. Replies
    1. I will have a look next week (sorry bit busy :-)

      Delete
    2. PS> do you have the exact version of Blender and the error message for me? I just tried on 3.0.0 and it seems to work just fine ...

      Delete
  3. How can I find the csv file after running your script?

    ReplyDelete
  4. The list will show up as a new file in the text editor

    ReplyDelete
  5. I found it, thank you!
    How hard would it be to modify this script so it adds the transform location (XYZ) and material color to the CSV output?
    I'm still learning Python in Blender.

    ReplyDelete
  6. Location is a direct object property, so easy to add. Material color is more convoluted. An object has an associated collection of material slots, each refering to a material. such a material can be associated with the object or the mesh data itself and can be node based or not. And then there is the question, what color exactly? diffuse, glossy, ... but probably display color? So quite a bit more complicated but certainly doable if you know where to look

    ReplyDelete