[Bf-committers] FLT_MAX and INT_MAX in UI

Ton Roosendaal ton at blender.org
Fri Jan 21 19:13:02 CET 2011


Hi,

The current UI min/max values are the physical limits for values,  
beyond that you get errors. Such limits are not very useful for UI  
inputs; most of the code will expect a value they can do some  
arithmetic with, a bit of adding, subtracting, multiplications.

-Ton-

------------------------------------------------------------------------
Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands

On 21 Jan, 2011, at 18:45, Doug Hammond wrote:

> Hi,
>
> Please also bear in mind addons that have peoperties for external
> applications which may require values of a larger range than  
> normally needed
> inside Blender.
>
> Any reason why ints can't be the full 32bit ?
>
> Cheers,
> Doug.
>
>
> On 21 January 2011 17:38, Brecht Van Lommel <brechtvanlommel at pandora.be 
> >wrote:
>
>> Hi,
>>
>> On Fri, Jan 21, 2011 at 5:50 PM, Ton Roosendaal <ton at blender.org>  
>> wrote:
>>> I'd suggest to replace these 'hard' min/max values with less extreme
>>> numbers, so you can still use it in C code and get some predictable
>>> output.
>>>
>>> FLT_MAX now is 3.40282347e+38F
>>> Our hardmax  can easily stick to 1.0e+9 i guess? (a billion)
>>>
>>> For ints, a max of 1<<26 or so... 67 million, with 24 fps, that  
>>> would
>>> last 5 years :)
>>
>> Yes, makes sense. It's a bit arbitrary, but 1e9 seems low, maybe  
>> make it
>> 1e15?
>>
>> Brecht.
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list