[Bf-committers] Patch for auto-identation in text editor
Campbell Barton
bf-committers@blender.org
Wed, 14 Jul 2004 22:29:08 +1000
Sorry but I dont quite get how I should go about getting this working,
could you show me how Id change this line?
active_tface[0].col[0] == tface[0].col[0]
...to work to compare the red/green/blue of both colours.
Thanks
- Cam
Ton Roosendaal wrote:
> Hi,
>
> Colors are 'packed' in an int, denoting bytes for ABGR respectively.
> Put a char pointer to the color, and read the color components
> individually. Alpha is by default 255.
>
> -Ton-
>
>
> On Wednesday, Jul 14, 2004, at 05:31 Europe/Amsterdam, Campbell
> Barton wrote:
>
>> Hi, Im having trouble comparing the colours of 2 faces- to break it
>> down All I need to do is compare the colour of 2 faces verts, as
>> shown below.
>>
>> - Comparing the red of the first vert of 2 faces.
>> active_tface[0].col[0] <= tface[0].col[0]+limit_int &&
>> active_tface[0].col[0]+limit_int >= tface[0].col[0]
>>
>> As you can see Im using a limit to make its possible to have some
>> fuzzyness.
>>
>> One problem I have is Im not sure whats white and whats black
>>
>> from doing a ...
>> printf("u%", active_tface[0].col[0])
>>
>> the col is an unsigned int from 255 to 4294967295
>>
>> The problem is that the races that are selected seem random and I
>> was windering if there was a better way to compare the colours of 2
>> faces.
>>
>> - Cam
>>
>> -- Campbell J Barton
>>
>> 133 Hope Street
>> Geelong West, Victoria 3218 Australia
>>
>> URL: http://www.metavr.com
>> e-mail: cbarton@metavr.com
>> phone: AU (03) 5229 0241
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://www.blender.org/mailman/listinfo/bf-committers
>>
>>
> ------------------------------------------------------------------------
> --
> Ton Roosendaal Blender Foundation ton@blender.org
> http://www.blender.org
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton@metavr.com
phone: AU (03) 5229 0241