0
$\begingroup$

How can I set the color set for an armature to use custom colors by python? I know that when I choose one color set that it shows an info. The info looks like this:

bpy.context.object.color_set = 'CUSTOM'

But when I type this command in interactive console I get an error that Object has no attribute color_set

How is that possible?

$\endgroup$
2
$\begingroup$
import bpy
from mathutils import Color

obj = bpy.context.active_object
bone_group = obj.pose.bone_groups['Group']
bone_group.color_set = "CUSTOM"
bone_group.colors.normal = Color((1.0, 0.0, 0.0))
bone_group.colors.select = Color((0.0, 1.0, 0.0))
bone_group.colors.active = Color((0.0, 0.0, 1.0))
$\endgroup$

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.