Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2017-07-26 22:56:43 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2017-07-26 23:05:54 +0300
commit320fc70cf223ba3d8c3822302d5f353861278089 (patch)
treece24a7568084a77dac551f8ef31ca5b87999968e
parent66e28a2827ab589756882983e07808742c198cb2 (diff)
Minor template code patch. (objectHitList =/= hitObjectList)
The Blender text editor's built in python template "Gamelogic" has a reference near the bottom to "objectHitList" as an alleged attribute to the KX_TouchSensor. This name is incorrect, it's correct name is "hitObjectList." Attempting to access the suggested objectHitList returns error... ``` AttributeError: 'KX_TouchSensor' object has no attribute 'objectHitList' ``` The provided diff corrects this minor error. Reviewers: kupoman, moguri, campbellbarton, Blendify Reviewed By: Blendify Tags: #game_engine, #game_python Differential Revision: https://developer.blender.org/D2748
-rw-r--r--release/scripts/templates_py/gamelogic.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/templates_py/gamelogic.py b/release/scripts/templates_py/gamelogic.py
index 01ac27c56cd..e589ad43e63 100644
--- a/release/scripts/templates_py/gamelogic.py
+++ b/release/scripts/templates_py/gamelogic.py
@@ -62,7 +62,7 @@ def main():
# adding to our objects "life" property
"""
actu_collide = cont.sensors["collision_sens"]
- for ob in actu_collide.objectHitList:
+ for ob in actu_collide.hitObjectList:
# Check to see the object has this property
if "life" in ob:
own["life"] += ob["life"]