tekknolagi
tekknolagi

Reputation: 11012

blender - how do I add a color to an object?

When I try, nothing happens. I select a color and click the object and nothing.

Maybe a python command?

Upvotes: 8

Views: 39709

Answers (3)

Anon
Anon

Reputation: 1

Use vertex paint in the options at the bottom:

click for an image

Upvotes: 0

George Profenza
George Profenza

Reputation: 51837

As @9000 mentioned, you might not have a material linked.

If you open a TextEditor window, you should be able to paste this script:

from random import random
import Blender
from Blender import *

scn = Blender.Scene.GetCurrent()
ob  = scn.objects.active
m   = ob.getData(mesh=True)
if(len(m.materials) < 1):
    mat = Material.New('newMat')
    m.materials += [mat]
m.materials[0].rgbCol = [random(), random(), random()]


Blender.Redraw()

This should set random colours, if you have a material linked, otherwise creates a new material and links it.

Note that you need Python installed on Windows for the console, and you need to start Blender from Terminal on OSX/Linux to see the console. Also, the snippet works for Blender 2.49, not 2.5x. You didn't mention which version of Blender you use.

HTH

Upvotes: 3

9000
9000

Reputation: 40884

  1. Select an object.
  2. In Button window (at bottom) select 'Shading' (a gray ball) and then 'Material buttons' (red ball)
  3. In 'Link and pipeline', press 'Add new'.
  4. Edit material color ('Col').

See it http://s3.amazonaws.com/twitpic/photos/large/222981727.png?AWSAccessKeyId=0ZRYP5X5F6FSMBCCSE82&Expires=1294658484&Signature=jDJpFXu7QI/7vGbW9BwBgL0trBU%3D

Upvotes: 5

Related Questions