python - How to create global variables? -
i need create variable (an array of floats) accessible , modifiable python controllers. if want know why need this, i'm trying implement neuroevolution , need store neural network parameters. i'm new python.
there dictionary (https://docs.python.org/2/tutorial/datastructures.html) accessible globally in blender.
it comes gamelogic-library , called globaldict
http://wiki.gameblender.org/index.php?title=globaldict
usage:
import gamelogic ... gamelogic.globaldict['key'] = value ... value = gamelogic.globaldict['key']
Comments
Post a Comment