﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3ASource%2FGameEngine%2F2.49%2FPython_API_Clean_Up</id>
	<title>Dev:Source/GameEngine/2.49/Python API Clean Up - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3ASource%2FGameEngine%2F2.49%2FPython_API_Clean_Up"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/GameEngine/2.49/Python_API_Clean_Up&amp;action=history"/>
	<updated>2026-04-26T20:20:48Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Source/GameEngine/2.49/Python_API_Clean_Up&amp;diff=79647&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/GameEngine/2.49/Python_API_Clean_Up&amp;diff=79647&amp;oldid=prev"/>
		<updated>2018-06-28T18:37:24Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 18:37時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Source/GameEngine/2.49/Python_API_Clean_Up&amp;diff=79646&amp;oldid=prev</id>
		<title>wiki&gt;Brita: moved Dev:Source/GameEngine/Python API Clean Up to Dev:Source/GameEngine/2.49/Python API Clean Up</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/GameEngine/2.49/Python_API_Clean_Up&amp;diff=79646&amp;oldid=prev"/>
		<updated>2014-08-07T14:02:53Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/Dev:Source/GameEngine/Python_API_Clean_Up&quot; class=&quot;mw-redirect&quot; title=&quot;Dev:Source/GameEngine/Python API Clean Up&quot;&gt;Dev:Source/GameEngine/Python API Clean Up&lt;/a&gt; to &lt;a href=&quot;/Dev:Source/GameEngine/2.49/Python_API_Clean_Up&quot; title=&quot;Dev:Source/GameEngine/2.49/Python API Clean Up&quot;&gt;Dev:Source/GameEngine/2.49/Python API Clean Up&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduction  =&lt;br /&gt;
&amp;lt;div id=&amp;quot;Introduction&amp;quot;&amp;gt;&lt;br /&gt;
ben2610, cyborg_ar and Moguri are working on cleaning up the BGE Python API, the following are some changes they are working on. &lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
= Goals  =&lt;br /&gt;
&amp;lt;div id=&amp;quot;Goals&amp;quot;&amp;gt;&lt;br /&gt;
*[[#get_set|Create properties to replace most of the get/set functions.]] &lt;br /&gt;
*[[#Expose_more_properties|Expose more logic brick properties to Python.]] &lt;br /&gt;
*[[#Qualtity_and_readability|Improve the quality and readability of the code.]] &lt;br /&gt;
*[[#Clean_up_remaining_Python_functions.|Clean up remaining Python functions.]]&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
== Use properties instead of get/set functions for the bricks' settings  ==&lt;br /&gt;
&amp;lt;div id=&amp;quot;get_set&amp;quot;&amp;gt;&lt;br /&gt;
Take for example, the setDLoc() method of the motion actuator. All this does is change a property of the logic brick, so instead it should simply be a property, dLoc. &lt;br /&gt;
&lt;br /&gt;
Now, to copy a setting from one actuator to another, instead of: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
  motion.setDLoc(motion2.getDLoc()[:2],motion2.getDLoc()[3])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you simply have to use: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
  motion.dLoc = motion2.dLoc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is much cleaner and easier to understand. &lt;br /&gt;
&lt;br /&gt;
Functions that represent actions for example &amp;quot;instantAddObject()&amp;quot; will be left as such. Some functions for getting read-only data (like getEventList()) will probably be left too. &lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
== Expose more logic brick properties to Python  ==&lt;br /&gt;
&amp;lt;div id=&amp;quot;Expose_more_properties&amp;quot;&amp;gt;&lt;br /&gt;
There are a lot of properties that were never exposed. For example, ISensor now has usePosPulseMode, useNegPulseMode, frequency, level, and invert. &lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
== Improve the quality and readability of the code  ==&lt;br /&gt;
&amp;lt;div id=&amp;quot;Qualtity_and_readability&amp;quot;&amp;gt;&lt;br /&gt;
Currently the code is unorganized and can be hard to sift through. Almost every file uses its own rules for organization (or none at all). We are working on making sure each file uses a similar format, and adding comments to make things easier to find. &lt;br /&gt;
&lt;br /&gt;
We are also working to change stuff like [http://pasteall.org/3341/cpp this] (yes, that's real code), to more proper code like [http://pasteall.org/3342/cpp this]. &lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
== Clean up remaining Python functions  ==&lt;br /&gt;
&amp;lt;div id=&amp;quot;Clean_up_remaining_Python_functions&amp;quot;&amp;gt;&lt;br /&gt;
Not all functions will be replaced by properties. We will look at the remaining ones to make sure they are written well, such as using PyList when needed. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Progress  =&lt;br /&gt;
&amp;lt;div id=&amp;quot;Progress&amp;quot;&amp;gt;&lt;br /&gt;
Here are a couple of tables showing our progress so far. Right now it only lists sensors and actuators found in source\gameengine\GameLogic and Ketsji. KX_GameObject is also being cleaned up, but it isn't in one of the tables since it isn't a sensor or actuator. &lt;br /&gt;
&lt;br /&gt;
Finished also means the brick's PyDoc has been updated. &lt;br /&gt;
&lt;br /&gt;
Note: Ben implemented a new property framework for us to use. This makes updating the API a lot easier. However, we have to go through and re-update the ones we've done&amp;amp;nbsp;;) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{|{{Css/prettytable|75%}}&lt;br /&gt;
|+ Progress so Far (Sensors) &lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;150&amp;quot; align=&amp;quot;center&amp;quot; | In Progress &lt;br /&gt;
| width=&amp;quot;150&amp;quot; align=&amp;quot;center&amp;quot; | Finished &lt;br /&gt;
| width=&amp;quot;150&amp;quot; align=&amp;quot;center&amp;quot; | Left To Do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
*Near &lt;br /&gt;
*Radar &lt;br /&gt;
*Delay &lt;br /&gt;
*Actuator &lt;br /&gt;
*ISensor &lt;br /&gt;
*ILogic_Brick&lt;br /&gt;
*Mouse &lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
*Always &lt;br /&gt;
*Keyboard &lt;br /&gt;
*Joystick &lt;br /&gt;
*Collision/Touch&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
*Property &lt;br /&gt;
*Random&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{|{{Css/prettytable|75%}}&lt;br /&gt;
|+ Progress so Far (Actuators) &lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;150&amp;quot; align=&amp;quot;center&amp;quot; | In Progress &lt;br /&gt;
| width=&amp;quot;150&amp;quot; align=&amp;quot;center&amp;quot; | Done &lt;br /&gt;
| width=&amp;quot;150&amp;quot; align=&amp;quot;center&amp;quot; | Left&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
*Action&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
*2D Filter &lt;br /&gt;
*Scene &lt;br /&gt;
*Property &lt;br /&gt;
*Random&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backwards Compatibility  =&lt;br /&gt;
&lt;br /&gt;
== What about my old code?  ==&lt;br /&gt;
&lt;br /&gt;
Code written for 2.48 should still be usable. We are keeping the old functions around for few a little bit (see [[#Timeline|Timeline]]), but they will be marked as deprecated. Using these functions will output a warning in the console. To disable the warnings, choose Game &amp;gt; Ignore Deprecation Warnings.&lt;br /&gt;
&lt;br /&gt;
Blender 2.49 ships with a utility that updates old scripts to use the new API: in the text editor, choose Text &amp;gt; Text plugins &amp;gt; Convert BGE 2.49. The utility can introduce errors in some circumstances, so be sure to keep a backup and carefully review the changes that are made.&lt;br /&gt;
&lt;br /&gt;
= Timeline  =&lt;br /&gt;
&lt;br /&gt;
== 2.49  ==&lt;br /&gt;
&lt;br /&gt;
By 2.49 we hope to have the properties ready to go and include the deprecated methods. 2.49 will also include the cleaned up methods. Since 2.49 will support previous code, and code that will work in 2.50, 2.49 will act as a transition between 2.48 and 2.50. &lt;br /&gt;
&lt;br /&gt;
== 2.50  ==&lt;br /&gt;
&lt;br /&gt;
For 2.50 we plan to remove all the deprecated functions. This will break old scripts that have not been adapted to the new API. Scripts that run in 2.49 without deprecation warnings will be able to run fine in 2.50.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Brita</name></author>
		
	</entry>
</feed>