vincent - 2008-06-08

Logged In: YES
user_id=1605452
Originator: NO

The following patch adds the object:surfacecolor and object:setsurfacecolor methods to celx:
http://vincent.gian.club.fr/celestia/surfacecolor.patch

object:surfacecolor() returns a triple which corresponds to the r, g, b components of the
object surface color.

Example:

-- Get object initial surface color
r0, g0, b0 = object:surfacecolor()

-- Set object surface color to green
earth:setsurfacecolor(0, 1, 0)

-- Give object back its initial surface color
object:setsurfacecolor(r0, g0, b0)

As pointed out by chuft-captain, this currently works with Celestia spheres, but not with cmod or 3ds meshes.
I noticed that this also works with .cms models, though. A different feature request -- assigned to Chris --
should be created for this issue.