[Bf-python] tp_getset update
Ken Hughes
khughes at pacific.edu
Thu Aug 11 16:27:44 CEST 2005
Yehoshua Sapir wrote:
> Ken Hughes wrote:
>
>> Yehoshua Sapir wrote:
>>
>>>
>>>> (3) does anyone have an idea how the doc field in the tp_getset is
>>>> accessed? For example:
>>>>
>>>> {"bias",
>>>> (getter)Lamp_getBias, (setter)Lamp_setBias,
>>>> "Lamp shadow map sampling bias",
>>>> NULL},
>>>>
>>>> If I try "print lamp.bias.__doc__" I get a doc string explaining how
>>>> to use a float (which is the type of "bias"). I haven't found
>>>> anything in the Python docs which explain how to access this field;
>>>> maybe it isn't implemented yet?
>>>
>>>
>>>
>>> help(lamp) and help(lamp.bias) work.
>>
>>
>>
>> from:
>>
>> help(lamp)
>> help(lamp.bias)
>>
>> I get:
>>
>> Help on Blender Lamp:
>>
>> [Lamp "Spot"]
>>
>> Help on float:
>>
>> 5.0
>>
>> ????
>> Ken
>> _______________________________________________
>
>
> from:
>
> import Blender
> lamp = Blender.Object.Get('Lamp')
> help(lamp)
>
> I get:
>
> Help on Blender Object object:
>
> class Blender Object(object)
> | Methods defined here:
> |
> | __cmp__(...)
> | x.__cmp__(y) <==> cmp(x,y)
> |
> | __repr__(...)
> | x.__repr__() <==> repr(x)
> |
> | addProperty(...)
> | () - Add a property to this object
> (and so on)
With latest CVS and Python 2.3, I get:
Help on Blender Object:
[Object "Lamp"]
Ken
More information about the Bf-python
mailing list