﻿<?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=%E5%88%A9%E7%94%A8%E8%80%85%3ASculptorjim%2FGame_Engine%2FLogic%2FControllers%2FPython</id>
	<title>利用者:Sculptorjim/Game Engine/Logic/Controllers/Python - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3ASculptorjim%2FGame_Engine%2FLogic%2FControllers%2FPython"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Sculptorjim/Game_Engine/Logic/Controllers/Python&amp;action=history"/>
	<updated>2026-04-26T13:52:56Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Sculptorjim/Game_Engine/Logic/Controllers/Python&amp;diff=134397&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Sculptorjim/Game_Engine/Logic/Controllers/Python&amp;diff=134397&amp;oldid=prev"/>
		<updated>2018-06-28T20:46:23Z</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日 (木) 20:46時点における版&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=%E5%88%A9%E7%94%A8%E8%80%85:Sculptorjim/Game_Engine/Logic/Controllers/Python&amp;diff=134396&amp;oldid=prev</id>
		<title>2012年7月3日 (火) 14:03にwiki&gt;Sculptorjimによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Sculptorjim/Game_Engine/Logic/Controllers/Python&amp;diff=134396&amp;oldid=prev"/>
		<updated>2012-07-03T14:03:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
= Python Controller =&lt;br /&gt;
The {{Literal|Python}} controller is a controller that checks the input using a user-programmed script, a.k.a. a Python script or any other file containing Python code. {{Literal|Python}} controllers have two modes: {{Literal|Script}} or {{Literal|Module}}. Both can be written in the text editor and stored inside the .blend file, or they can be external script files. Further explanation of the two modes is given below.&lt;br /&gt;
&lt;br /&gt;
[[File:BGE_Controller_Python.png|right|thumb|292px|Python Controller]]&lt;br /&gt;
;'''Execution Method'''&lt;br /&gt;
;This menu state which method the Python code is to be accessed: script or Module.&lt;br /&gt;
&lt;br /&gt;
;'''Name'''&lt;br /&gt;
;Allows the user to input the name of the script or module file.&lt;br /&gt;
&lt;br /&gt;
{{clr}}&lt;br /&gt;
&lt;br /&gt;
== Script Mode ==&lt;br /&gt;
In {{Literal|Script}} mode, the controller is linked to a script, the whole script will be executed before the logic moves on. Everything in the script will happen at the same frame, if the same value or attribute are changed more than once, only the latest will be visible in the game because of this. If for example the position of an object is changed first to (100.0,100.0,100.0) but later in the same script changed to (0.0,0.0,0.0), then only the (0.0,0.0,0.0) will be visible to the player because the move to (100.0,100.0,100.0) happened on at the same frame.&lt;br /&gt;
{{clr}}&lt;br /&gt;
&lt;br /&gt;
== Module Mode ==&lt;br /&gt;
Since Blender 2.49 the Python module controller was added. Simply choose {{Literal|Module}} instead of {{Literal|Script}} on your {{Literal|Python}} controller drop-down menu. Then you define a function on that module and call that function from the controller. Instead of writing “&amp;lt;code&amp;gt;myScript.py&amp;lt;/code&amp;gt;” on the script edit box, you’ll write “&amp;lt;code&amp;gt;myModule.myFunc&amp;lt;/code&amp;gt;” on the module edit box. This function will run every time the controller is called. But other functions and variables outside of &amp;lt;code&amp;gt;myFunc&amp;lt;/code&amp;gt;’s scope will only run once. This is good for optimizing your code when you want to initiate variables only once then use them later.&lt;br /&gt;
&lt;br /&gt;
The Python module controller supports any number of attributes, this means packages are supported automatically. As well as “&amp;lt;code&amp;gt;myModule.myFunc&amp;lt;/code&amp;gt;” you can do “&amp;lt;code&amp;gt;myPackage.myModule.myFunc&amp;lt;/code&amp;gt;”, nested packages work too, as does method calls on class instances like: “&amp;lt;code&amp;gt;myPackage.myModule.myInstance.myMethod&amp;lt;/code&amp;gt;”. The python controller is passed to the python function as an argument for functions that take one arg.&lt;br /&gt;
&lt;br /&gt;
This allows live editing of scripts, learn more about the Python module controller at:&lt;br /&gt;
 *Thread http://blenderartists.org/forum/showthread.php?t=156672&lt;br /&gt;
 *Video http://download.blender.org/apricot/live_bge_edit.ogv&lt;br /&gt;
{{clr}}&lt;br /&gt;
&lt;br /&gt;
{{Page/Footer|Doc:2.5/Manual/Game Engine/Logic/Sensors/Types|Doc:2.5/Manual/Game Engine/Logic/Controllers/Expressions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Game engine]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Sculptorjim</name></author>
		
	</entry>
</feed>