These are some good suggestions. I'll what I can do (or who I can poke :P ) about them. However, I think a few points need to be made.<br><br>On 1. This makes sense for most actuators. But a few should return a name, like Add Object's object property since there is no object for it until it's actually added (at which point you can use GetLastCreatedObject()).<br>
<br>On 2. This may be used since there is an identifier for things besides objects, there's also IM (image), MA (materials), and such. I don't know if removing the prefix will cause issues, but probably not since Blender should already be smart enough to know which to look for.<br>
<br>On 3. This would make things a whole lot nicer, and simpler.<br><br>Thanks again for your suggestions and interest in the topic!<br><br>--Mitchell "Moguri" Stokes<br><br><div class="gmail_quote">On Wed, Feb 18, 2009 at 3:52 AM, Campbell Barton <span dir="ltr"><<a href="mailto:ideasman42@gmail.com">ideasman42@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey there, not sure if these changes would be appropriate for 2.49 or<br>
2.5 BGE api but will suggest them anyway and see what ya think.<br>
<br>
1) return Objects, Meshes, not their names.<br>
<br>
BGE api by default will return an Object/Mesh name when running<br>
actuator.getObject() and similar. Its much more useful to return the<br>
object or mesh its self, since I found in many cases I needed to<br>
lookup the scenes for the object name since I wanted to check the<br>
objects location or a property on it.<br>
I added an optional argument for some of the actuators to get the data<br>
rather then the name, but with attributes there are no arguments so<br>
for existing scripts...<br>
act.getObject() -> <a href="http://act.object.name" target="_blank">act.object.name</a><br>
...If we decide to return Objects/Meshes rather then just names.<br>
<br>
2) GET RID OF STUPID "OB" PREFIX EVERYWHERE!<br>
there is a reason <a href="http://id.name" target="_blank">id.name</a>+2 is used throughout blenders code. Not sure<br>
why nobody picked this up in the BGE before a release.<br>
For those of your who are not aware "Suzanne" is known as "OBSuzanne"<br>
in the BGE, Having to do '<a href="http://ob.name" target="_blank">ob.name</a>[2:]' is annoying.<br>
<br>
3) return Mathutils types Vector(), Matrix() etc.<br>
Its annoying that in C++ you can do vec1+vec2 but in the python API<br>
you have do this one axis at a time or convert to Mathutils types.<br>
We switched some parts of Blender.* api to use Mathutils types and<br>
surprisingly few scripts broke because in most cases they can be used<br>
interchangeably with tuples/lists.<br>
<br>
-------<br>
1) and 2) I'm quite keen on having, 3) is just a nice touch.<br>
For the changes I mentioned scripts will need updating and this will<br>
break more then the proposed get/set -> attributes change.<br>
Otherwise all these changes are quite easy to do, I can probably find<br>
the time in the next few weeks.<br>
I'll also update scripts in YoFrankie's SVN repo.<br>
<br>
- Campbell<br>
<br>
On Tue, Feb 17, 2009 at 4:37 AM, Benoit Bolsee <<a href="mailto:benoit.bolsee@online.be">benoit.bolsee@online.be</a>> wrote:<br>
> I'm strongly in favor of a 2.49 release. There has been significant<br>
> improvements on the BGE side that deserve an official release:<br>
> VideoTexture, BGE API cleanup, bug fixes.<br>
><br>
> For the BGE API cleanup, we plan to have a transition phase where the<br>
> old API will still be supported but will produce deprecation warnings on<br>
> the console. A 2.49 release will allow us to propose a smooth transition<br>
> from 2.4x to 2.50 by introducing the new API in 2.49 and dropping the<br>
> old in 2.50.<br>
> Then the procedure to upgrade the scripts will be as follow: run your<br>
> game under 2.49 with warnings enabled, fix the scripts until there is no<br>
> warning, the game is ready for 2.50!<br>
><br>
> Without a 2.49 we will have to do the transition between 2.50 and 2.51,<br>
> which looks a bit odd, or worse between a unofficial release and 2.50.<br>
><br>
> Of course if we decide to go for a 2.49 release, I'll make sure that the<br>
> new API and VideoTexture and fully ready for the release.<br>
><br>
> /benoit<br>
><br>
> _______________________________________________<br>
> Bf-committers mailing list<br>
> <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
><br>
_______________________________________________<br>
Bf-committers mailing list<br>
<a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
</blockquote></div><br>