[Bf-committers] Numeric fields should accept coma and convert it todot

Damir Prebeg blend.factory at gmail.com
Sun Apr 17 00:24:40 CEST 2011


Well, I know that Python interprets 1, 2 as (1, 2) but as I can see
numeric field actually calculates sum of numbers separated by coma
witch Python doesn't do by it self. Since parser does that, wouldn't
be possible to create parser that will distinguish simple 1, 2 from
sum(1, 2) or from [1, 2]?
And to be honest, I don't understand what's the problem with units. If
someone uses imperial, metric or blender unit system, then he will use
only one system at the time. Parser should be aware active unit system
and should not mix 1'000,00 and 1,0.

On 16 April 2011 16:12, Campbell Barton <ideasman42 at gmail.com> wrote:
> Also units, where: 2' 4"
> ... is valid input for: 2 ft 4 inches
>
> Supporting 1'000,00 & units & python evaluation would be tricky and
> error prone enough to make it not workable IMHO.
>
> On Sat, Apr 16, 2011 at 11:28 AM, Martin Poirier <theeth at yahoo.com> wrote:
>> The issue is that it doesn't accept just numbers, it accepts anything that evaluates to an expression, so you can type stuff lie: 1/3, 16/9*480, sum(15, 12.5, 48.6), ...
>>
>> Strictly parsing with a locale is not possible.
>>
>> Martin
>>
>> --- On Sat, 4/16/11, Remo Pini <remo.pini at avexys.com> wrote:
>>
>>> From: Remo Pini <remo.pini at avexys.com>
>>> Subject: Re: [Bf-committers] Numeric fields should accept coma and convert it todot
>>> To: "bf-blender developers" <bf-committers at blender.org>
>>> Received: Saturday, April 16, 2011, 3:54 AM
>>> I actually think that Blender should
>>> try to adhere to whatever locale
>>> settings the user has chosen if at all possible. This goes
>>> for date,
>>> time and number formats.
>>>
>>> I've seen numbers setup like 1000.00 / 1'000.00 / 1,000.00
>>> / 1'000,00 ->
>>> simply accepting "." and "," will not solve this issues,
>>> the "parser"
>>> needs to be locale aware instead of just replacing
>>> things...
>>>
>>> Cheers
>>>
>>> Remo
>>>
>>> > -----Original Message-----
>>> > From: bf-committers-bounces at blender.org
>>> [mailto:bf-committers-
>>> > bounces at blender.org]
>>> On Behalf Of Damir Prebeg
>>> > Sent: Freitag, 15. April 2011 11:08
>>> > To: bf-blender developers
>>> > Subject: [Bf-committers] Numeric fields should accept
>>> coma and convert
>>> it
>>> > todot
>>> >
>>> > I use numeric keys a lot, but on my locale settings
>>> num key DEL is
>>> > coma not dot. Because of that I often make mistakes
>>> with numeric
>>> > inputs. I think that all numeric fields should accept
>>> and convert coma
>>> > to dot.
>>> > _______________________________________________
>>> > 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
>>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>
>
>
> --
> - Campbell
> _______________________________________________
> 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