[Bf-python] Mesh Colors

Campbell Barton cbarton at metavr.com
Thu Sep 28 17:09:44 CEST 2006


Martin Poirier wrote:
> --- Levi <levischooley at eaglecom.net> wrote:
>
>   
>>> But this let be to wonder what the alpha
>>> value did. as far as I can tell its only
>>> ever used for the vertex paint code to work
>>> woth soft brushes (verts that are further
>>> away get a lower alpha), nowhere else can I
>>> see it being used.
>>> Could we remove access to the alpha value
>>> since (AFAIK) it has no practicle use?
>>>       
>> Hehe, way to open a firing squad on yourself! :)
>>
>> Anyway, I thought I'd throw my 2 cents in. You can
>> use the vertex
>> alpha values in the game engine. I've used it to
>> create a type of
>> multi-texturing that isn't possible otherwise. Until
>> we are able
>> to manipulate the alpha values from within Blender,
>> the only way
>> to set them has been through python.
>>
>> In this case, I would recommend that you leave them
>> alone. ;)
>>     
>
> In anycase, why would you remove something that works.
> I'd say, only add a disclaimer in the docs that this
> value will be overwritten if modified by Blender but
> can otherwise be used in the Game Engine.
>
> Martin

It depends how you look at it- I may be wrong about this. but access to 
data that has no meaning (is volatile, overwritten when painting )
is not useful, Maybe The verts mcol is used and tfaces left intact or 
somthing, I should really look into it....
Anyhow, since people seem to see the alpha as having a meaning in the 
future if not now. best not remove access to it,

Levi, Id be interested in how you used the alpha- was it alpha from the 
tface or vertex?, did you use NMesh or Mesh?

Anyhow, I think my questions answered. will be.
r,g,b,a= face.col[i]
and
face.col[i]= r,g,b,a

-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list