[Bf-python] Blender.Group

Ken Hughes khughes at pacific.edu
Fri Mar 17 01:39:05 CET 2006


Martin Poirier wrote:
> 
> --- Ken Hughes <khughes at pacific.edu> wrote:
> 
> 
>>cpbarton at iinet.net.au wrote:
>>
>>>See if I cant do it tonight
>>>Sounds good,
>>>
>>>
>>>Quoting Toni Alatalo <antont at kyperjokki.fi>:
>>>
>>>
>>>
>>>>On Tuesday 14 March 2006 15:03, Martin Poirier
>>
>>wrote:
>>
>>>>>>behaves like a set and looks like a set, is a
>>
>>set,
>>
>>>>>Python/C, there's probably a Set Protocol that
>>
>>you
>>
>>>>>need to implement (to make BlenderGroup behave as
>>
>>a
>>
>>>>well i tried to mean that implementing the set
>>
>>protocol is making the thing 
>>
>>>>behave like a set and look like a set - i guess in
>>
>>principle it is the same 
>>
>>>>thing in c and py,
>>>>
>>>>but do admit that i have not done it in c.
>>>>
>>>>
>>>>
>>>>>Martin
>>>>
>>>>~Toni
>>
>>Sorry, was out of town so didn't catch this until
>>now.
>>
>>I was thinking the other day that maybe the Set
>>Protocol would be a good 
>>compromise in handling bitmask flags in Blender. 
>>It's Pythonic plus it 
>>lets the user set multiple settings in a single
>>operation.
> 
> 
> The only problem with using it is that the set
> protocol is probably a python 2.4 feature of the
> C/Python api, so people still on 2.3 will be majorly
> pissed when they find out they can't even compile
> anymore.

But I thought what Cam was proposing here was
to implement a custom BPy set class/object?  In fact,
why not implement this for Blender versions based on
Python 2.3 and let versions based on 2.4 use the
built-in set class?

Ken



More information about the Bf-python mailing list