[Bf-python] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11267] branches/pyapi_devel/source/ blender/python/api2_2x: * Object, made softbodies a seperate type rather then having its variables mised up with object .

Campbell Barton cbarton at metavr.com
Sat Jul 14 05:22:55 CEST 2007


Matt Ebb wrote:
> On 7/14/07, Campbell Barton <cbarton at metavr.com> wrote:
>> * Lamp - use radians for lamp angle
> 
> This sounds a bit ugly.. I know there's the idea of using radians
> consistently in the py API, but the spot angle seems like a different
> case to me. Of course you want to use radians when you're doing all
> sorts of fancy angle calculations and trigonometry, but I see the spot
> lamp as different - it's not often used as a 3D angle to do
> calculations with, it's pretty much just used as a simple variable to
> set the width of the spot beam, with fixed 0-180 limits. It's expected
> that people will have knowledge of radians and degrees and conversion
> etc if they're doing trig, messing with vectors and face normals, but
> for just setting the spot width...?
> 
> Having this in radians just seems like it would be quite awkward, especially
> when the number you set is completely different to what you see before and
> after in the UI, and it sounds like something that would get quite
> annoying and confusing  to use.
> 
> Just my 2c.
> 
> Matt

I can see where your coming from and also that if your just getting into 
the python api that just using degrees is easier.

The existing api has so many inconsistency's that its embarrassing. - 
when dealing with materials, object data, color and 3d vectors all have 
multiple incompatible ways of working.

At the moment we have
- some eulers as radians
- some eulars as deg
- ipo euler rotations as deg/10

At the expense of being a bit annoying to newcomers Id rather make it 
simple by saying - "all angles are radians"

Then scripters can just use math.radians() if they need.

I wasnt around when the decision was made to use radians so using 
degrees everywhere would be an ok option in my opinion also.

Its possible then when the API is done we decide to have cameras and 
lamps as exceptions to the rule, but for now Id like to stick to radians 
everywhere. if users accept using math.radians() in some places, its not 
so bad if they need to use them when setting the lamp or camera angle's 
also.








More information about the Bf-python mailing list