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:
authorDalai Felinto <dfelinto@gmail.com>2018-04-16 15:07:42 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-04-17 18:51:28 +0300
commit159806140fd33e6ddab951c0f6f180cfbf927d38 (patch)
treeda076be3baa4d987fb5935e220a3d901c926e0e7 /release/scripts/templates_py
parent28b996a9d2090efdd74115a653629ef9d7d871f7 (diff)
Removing Blender Game Engine from Blender 2.8
Folders removed entirely: * //extern/recastnavigation * //intern/decklink * //intern/moto * //source/blender/editors/space_logic * //source/blenderplayer * //source/gameengine This includes DNA data and any reference to the BGE code in Blender itself. We are bumping the subversion. Pending tasks: * Tile/clamp code in image editor draw code. * Viewport drawing code (so much of this will go away because of BI removal that we can wait until then to remove this.
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r--release/scripts/templates_py/gamelogic.py73
-rw-r--r--release/scripts/templates_py/gamelogic_module.py27
-rw-r--r--release/scripts/templates_py/gamelogic_simple.py17
3 files changed, 0 insertions, 117 deletions
diff --git a/release/scripts/templates_py/gamelogic.py b/release/scripts/templates_py/gamelogic.py
deleted file mode 100644
index e589ad43e63..00000000000
--- a/release/scripts/templates_py/gamelogic.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# This script must be assigned to a python controller
-# where it can access the object that owns it and the sensors/actuators that it connects to.
-
-import bge
-
-# support for Vector(), Matrix() types and advanced functions like Matrix.Scale(...) and Matrix.Rotation(...)
-# import mathutils
-
-# for functions like getWindowWidth(), getWindowHeight()
-# import Rasterizer
-
-
-def main():
- cont = bge.logic.getCurrentController()
-
- # The KX_GameObject that owns this controller.
- own = cont.owner
-
- # for scripts that deal with spacial logic
- own_pos = own.worldPosition
-
- # Some example functions, remove to write your own script.
- # check for a positive sensor, will run on any object without errors.
- print("Logic info for KX_GameObject", own.name)
- input = False
-
- for sens in cont.sensors:
- # The sensor can be on another object, we may want to use it
- own_sens = sens.owner
- print(" sensor:", sens.name, end=" ")
- if sens.positive:
- print("(true)")
- input = True
- else:
- print("(false)")
-
- for actu in cont.actuators:
- # The actuator can be on another object, we may want to use it
- own_actu = actu.owner
- print(" actuator:", actu.name)
-
- # This runs the actuator or turns it off
- # note that actuators will continue to run unless explicitly turned off.
- if input:
- cont.activate(actu)
- else:
- cont.deactivate(actu)
-
- # Its also good practice to get sensors and actuators by name
- # rather then index so any changes to their order wont break the script.
-
- # sens_key = cont.sensors["key_sensor"]
- # actu_motion = cont.actuators["motion"]
-
- # Loop through all other objects in the scene
- sce = bge.logic.getCurrentScene()
- print("Scene Objects:", sce.name)
- for ob in sce.objects:
- print(" ", ob.name, ob.worldPosition)
-
- # Example where collision objects are checked for their properties
- # adding to our objects "life" property
- """
- actu_collide = cont.sensors["collision_sens"]
- for ob in actu_collide.hitObjectList:
- # Check to see the object has this property
- if "life" in ob:
- own["life"] += ob["life"]
- ob["life"] = 0
- print(own["life"])
- """
-
-main()
diff --git a/release/scripts/templates_py/gamelogic_module.py b/release/scripts/templates_py/gamelogic_module.py
deleted file mode 100644
index 88c8cf0d75b..00000000000
--- a/release/scripts/templates_py/gamelogic_module.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# This module can be accessed by a python controller with
-# its execution method set to 'Module'
-# * Set the module string to "gamelogic_module.main" (without quotes)
-# * When renaming the script it MUST have a .py extension
-# * External text modules are supported as long as they are at
-# the same location as the blendfile or one of its libraries.
-
-import bge
-
-# variables defined here will only be set once when the
-# module is first imported. Set object specific vars
-# inside the function if you intend to use the module
-# with multiple objects.
-
-
-def main(cont):
- own = cont.owner
-
- sens = cont.sensors['mySensor']
- actu = cont.actuators['myActuator']
-
- if sens.positive:
- cont.activate(actu)
- else:
- cont.deactivate(actu)
-
-# dont call main(bge.logic.getCurrentController()), the py controller will
diff --git a/release/scripts/templates_py/gamelogic_simple.py b/release/scripts/templates_py/gamelogic_simple.py
deleted file mode 100644
index dbfcf948b18..00000000000
--- a/release/scripts/templates_py/gamelogic_simple.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import bge
-
-
-def main():
-
- cont = bge.logic.getCurrentController()
- own = cont.owner
-
- sens = cont.sensors['mySensor']
- actu = cont.actuators['myActuator']
-
- if sens.positive:
- cont.activate(actu)
- else:
- cont.deactivate(actu)
-
-main()