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

Campbell Barton ideasman42 at gmail.com
Thu Feb 19 05:01:03 CET 2009


Note, just looked at the conversion functions and using the ID prefix
is not consistent in the BGE, Scenes and IPO's ignore the prefix.

On Wed, Feb 18, 2009 at 6:46 PM, Mitchell Stokes <mitchell at daboys4u.com> wrote:
>> Whenever possible, can you please make sure to make your changes backwards
>>
>> compatible, so the scripts don't break?
>
> One of our goals has been to keep backwards compatibility (at least for a
> while).
Unless we agree on any changes this is ofcourse how it should stay.
But with 2.5 being the next big thing, we can plan updates for the BGE
too. Im happy to do the python 2->3 update whenever we switch over.

> Right now the new API does not break any scripts (at least it shouldn't).
> All the functions that have been replaced have been left in, but show a
> deprecation warning when used.
I guess we can agree that removing these in 2.5+ is OK, even if they
break blend files from the blender gamekit which was released with
2.48?

> As for returning the object reference as opposed to the name shouldn't break
> scripts (at least not much). Most (if not all) the methods and properties
> that use the name of the object can also use object references. So, in cases
> where someone uses something like
>
> ob = act.getObject()
> act2.setObject(ob)
>
> This would still work. Also, it would be properties that would be changed
> (well, mostly added as most of these properties don't exist). This means
> that the old methods would work the same way (save the deprecation warning),
> and it would be the property that would now be an object reference instead
> of a name. There are going to be a few methods left that return objects (I'm
> not sure if it's by name or reference) which will not have properties.
if your OK with this then so am I, but "shouldn't break scripts (at
least not much)." is as good as breaking scripts IMHO. eg, doing most
things with the resulting object will break scripts.
 obname = act.getObject()
 ob = scene.getObjectList[obname]
....unless the updater script replaces act.getObject() with act.object.name

> Also, the deprecation warnings can be turned off via an option in the Game
> menu (this is already there) and through blenderplayer with -g
> ignore_deprecation_warnings = 1 (also already added).
>
> --Mitchell "Moguri" Stokes
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>



-- 
- Campbell


More information about the Bf-committers mailing list