Hi, I’ve been playing around with some python loops in BGE that read data from a UDP socket over a WIFI connection, it seems relatively straight forward in the game logic scripting (using the globalDict variables and such) but doesnt seem to be the same in the BPY (editing type viewport).
I will be adding some example scripts I’ve written for BGE and some videos to give more detail but long story short: in BPY (edit mode) I need a script that updates a vert’s rotation/position according to some data received from a remote application.
I can not seem to get the hang of initializing a loop in BPY as the embedded interpreter needs to loop blender’s main code for every time the viewport is redrawn. if i create a socket object like i would normally in python and store that object in a variable then try to run it in blender (BPY or BGE) it resets many things (including the variables containing the object’s id and its settings). I’m not aware of any global variable in BPY as the ones similar to the BGE’s GameLogic.globalDict[“SOMEVARIABLE”]
Any assistance here would be extremely helpful.
Thank you,
Grant.
It is a very interesting demo. Can I share your blender file also? If so, email it to me at [email protected]? I would like to play it with some virtual data (without that controller connected at serial port) .