laas/morse — pull request #45 by pierriko (2012-02-14 03:32:20+00:00)
Title: [blend] texface convert on each .blend file

Convert old texface settings into material. It may create new materials if needed, see:

#!/bin/bash

rm -rf build

pysrc=$(mktemp)
cat > $pysrc << EOF
import bpy
bpy.ops.logic.texface_convert()
bpy.ops.wm.save_mainfile(filepath=bpy.data.filepath, check_existing=False)
EOF

blend=$(find . -name "*.blend")
for cpnt in $blend; do
blender --background $cpnt --python $pysrc
done

rm $pysrc

echo "done!"

http://www.blender.org/documentation/blender_python_api_2_61_release/bpy.ops.logic.html#bpy.ops.logic.texface_convert