[Bf-committers] BGE API - was 2.49 release proposal

Ton Roosendaal ton at blender.org
Wed Feb 18 20:11:48 CET 2009


Hi,

> 2) GET RID OF STUPID "OB" PREFIX EVERYWHERE!
> there is a reason id.name+2 is used throughout blenders code. Not sure
> why nobody picked this up in the BGE before a release.

Design note: the first two chars in id.name are protected, and contain 
a code for the internal dbase. All ID renaming should also go via the 
api in bke library.c

-Ton-

------------------------------------------------------------------------
Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands

On 18 Feb, 2009, at 12:52, Campbell Barton wrote:

> Hey there, not sure if these changes would be appropriate for 2.49 or
> 2.5  BGE api but will suggest them anyway and see what ya think.
>
> 1) return Objects, Meshes, not their names.
>
> BGE api by default will return an Object/Mesh name when running
> actuator.getObject() and similar. Its much more useful to return the
> object or mesh its self, since I found in many cases I needed to
> lookup the scenes for the object name since I wanted to check the
> objects location or a property on it.
> I added an optional argument for some of the actuators to get the data
> rather then the name, but with attributes there are no arguments so
> for existing scripts...
>  act.getObject() -> act.object.name
> ...If we decide to return Objects/Meshes rather then just names.
>
> 2) GET RID OF STUPID "OB" PREFIX EVERYWHERE!
> there is a reason id.name+2 is used throughout blenders code. Not sure
> why nobody picked this up in the BGE before a release.
> For those of your who are not aware "Suzanne" is known as "OBSuzanne"
> in the BGE, Having to do  'ob.name[2:]'  is annoying.
>
> 3) return Mathutils types Vector(), Matrix() etc.
> Its annoying that in C++ you can do vec1+vec2 but in the python API
> you have do this one axis at a time or convert to Mathutils types.
> We switched some parts of Blender.* api to use Mathutils types and
> surprisingly few scripts broke because in most cases they can be used
> interchangeably with tuples/lists.
>
> -------
> 1) and 2) I'm quite keen on having,  3) is just a nice touch.
> For the changes I mentioned scripts will need updating and this will
> break more then the proposed get/set -> attributes change.
> Otherwise all these changes are quite easy to do, I can probably find
> the time in the next few weeks.
> I'll also update scripts in YoFrankie's SVN repo.
>
> - Campbell
>
> On Tue, Feb 17, 2009 at 4:37 AM, Benoit Bolsee 
> <benoit.bolsee at online.be> wrote:
>> I'm strongly in favor of a 2.49 release. There has been significant
>> improvements on the BGE side that deserve an official release:
>> VideoTexture, BGE API cleanup, bug fixes.
>>
>> For the BGE API cleanup, we plan to have a transition phase where the
>> old API will still be supported but will produce deprecation warnings 
>> on
>> the console. A 2.49 release will allow us to propose a smooth 
>> transition
>> from 2.4x to 2.50 by introducing the new API in 2.49 and dropping the
>> old in 2.50.
>> Then the procedure to upgrade the scripts will be as follow: run your
>> game under 2.49 with warnings enabled, fix the scripts until there is 
>> no
>> warning, the game is ready for 2.50!
>>
>> Without a 2.49 we will have to do the transition between 2.50 and 
>> 2.51,
>> which looks a bit odd, or worse between a unofficial release and 2.50.
>>
>> Of course if we decide to go for a 2.49 release, I'll make sure that 
>> the
>> new API and VideoTexture and fully ready for the release.
>>
>> /benoit
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



More information about the Bf-committers mailing list