bmesh py api: change .from_mesh() / .to_mesh() to be class methods of BMesh rather than functions in the module.

added example script which converts a mesh to a bmesh, edits and converts back again.
This commit is contained in:
2012-03-11 02:45:27 +00:00
parent 0c50bedd9c
commit 21fd09c028
5 changed files with 123 additions and 65 deletions

View File

@@ -0,0 +1,17 @@
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()