[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33650] trunk/blender/source/blender/ makesrna/intern/rna_define.c: disallow RNA color values to be set to negative values.

Campbell Barton ideasman42 at gmail.com
Tue Dec 14 06:35:19 CET 2010


On Tue, Dec 14, 2010 at 5:10 AM, Matt Ebb <matt at mke3.net> wrote:
> On Tue, Dec 14, 2010 at 3:44 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
>
>> Log Message:
>> -----------
>> disallow RNA color values to be set to negative values. Material colors could be set to -100.0 if typed in manually, this is sure to cause bad/unpredictable behavior.
>
> If this is a problem for materials, then it should be set in the
> material colour's range functions. Forcing all colour properties to
> have these limits is too heavy handed - It's not sure to cause bad
> behaviour, there are plenty of cases where you might want negative
> values in a colour property - doing things in the compositor for
> example.
>
> Matt

Hi Matt,
Yep, materials could have their colors clamped instead (setting value
ranges is enough, without having range functions).
However this is the sort of thing that is often overlooked when adding
properties - color properties like sequencer, bone, object, theme,
lamp shadow, render stamp, fcurve, brush, world.... etc.

So I think its better to have negative colors opt-in.
This way nodes which are known to work with negative colors can have
negative values explicitly set.

If you think most compo/shader nodes work with negative colors I can
add in calls to all of them to allow negative color's so at least they
work the same as before.
Later if its found some compo nodes dont work right negative color
func can be removed ofcourse.

Would this be ok?


More information about the Bf-committers mailing list