#question from IRC:
#how much work would it be to be able to change things like diffuse_color _Value and Spec_intensity (multiply by input value) of aall materials of selected objects?
__author__ = 'thoth'
import bpy
def adjust_all_hues(mats):
for m in mats:
m.diffuse_color.h = m.diffuse_color.h + 0.2
#m.diffuse_color.r = 1-m.diffuse_color.r
def mission1(scn):
mats = set()
for o in scn.objects:
if o.select:
for ms in o.material_slots:
mats.add(ms.material)
adjust_all_hues(mats)
mission1(bpy.context.scene)
|
Blender python API quick-start
Syntax highlighting by Pygments.