http://www.miikahweb.com/feed.php MiikaHweb - Blender Commits By Pgi http://www.miikahweb.com/ MiikaHweb - Blender Commits By Pgi fi Fri, 29 May 20 01:03:31 +0000 MiikaHweb RSS contact at miikahweb.com <![CDATA[[225027c] master: BGE - new read-only attribute in KX_GameObject python api (...]]> http://www.miikahweb.com/en/blender/git-logs/commit/225027ce5dea3785626908b58b01fb3959cf8362 225027c
Branches : master
Author : Pierluigi Grassi (pgi)
Committed By : Jorge Bernal (lordloki)
----------------------------------------
BGE - new read-only attribute in KX_GameObject python api (LOD level)

Added a new "current_lod_level" property to the python api of
KX_GameObject. The property returns the current lod level of the game
object. The purpose of the property is activate logic routines only when
an object is at a certain lod-distance from the camera, avoiding to
separately recomputing the same distance in the logic script. Usage in
python script might look like:

owner = bge.logic.getCurrentController().owner
lod_level = owner.currentLodLevel
if lod_level == 0: ...do something
else: ... object might be too distant

Reviewers: dfelinto, kupoman, moguri

Reviewed By: kupoman, moguri

Subscribers: lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D978

----------------------------------------
3 Paths Changed]]>
Sun, 15 Mar 2015 16:26:49 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/225027ce5dea3785626908b58b01fb3959cf8362Pierluigi Grassi