Modify properties in the .blend file (command line) I'm writing an application which will display a nice looking 3D model of a building. The building will have some areas which will change their color depending on some data points provided by the application.

The application will invoke blender's command line rendering feature to generate a PNG out of the .blend file, which then can be displayed in the UI.

The point where I'm stuck is how to change some material colors in the .blend file.

All hints are appreciated.
The following command line will do the job (-P will run the given python script before rendering):

blender -b OG1.blend  -P ChangeColor.py -o Render.png -f 0


ChangeColor.py:

import bpy

bpy.data.materials["NameOfMaterial"].diffuse_color = (0, 1.0, 0)


The value ranges for the color channels are [0 to 1.0].

Thank you for your help, poor! Blender ist just too awesome! &lt;3