[Bf-committers] re: Python and layers

Ken Hughes khughes at pacific.edu
Mon Oct 9 16:46:22 CEST 2006

Alexander Ewering wrote:
> On Tue, 10 Oct 2006, Campbell Barton wrote:
>> Thanks Matt, this makes more sense now.
>> Im not sure what the solution should be..
>> scn1.Layers= scn2.Layers should never raise an error IMHO. so maybe 
>> let the user effect the next 12 bits?
>> That or allow the users to set it but  dont apply the setting of the 
>> last 12 bits.
>> that means after scn1.Layers != scn2.Layers  which could be confusing :/.
> If there is a way to "recode" the "=", "==" and "!=" operators in python 
> (??),
> they should all be recoded (for the scn.Layers case) to affect *and*
> compare just the lower 20 bits. Then, all is well, and nothing in Blender
> needs to be modified, + no potential crasher functionality is exposed to
> Python coders.

So if the other bits are not "layer" bits, why not just mask what is 
return from the getter and similarly "OR" those bits in the setter?


More information about the Bf-committers mailing list