Open hahnf1 opened 5 years ago
Thinking about using Python's multiprocessing module to spawn a new process that can take care of moving the image files around while Arma 3 executes. New process will utilize shutil to move the files to the target directory(ies). @ColinLeongUDRI what do you think about this?
As I understand it, the main problem is that the in-game screenshot function can take a max number of screenshots before the folder fills up, right? Thus the need to constantly move files out.
So there's two possible solutions I can see:
I personally would lean towards (2), simply because I haven't done much work with multiprocessing code and I'd need to spin up on it.
shutil
can work. The other main Python library for these sorts of things is os
.
It's up to you all.
Whatever you do go with, it is good to document the thought process behind the decision. "We thought about x, y, and z options, and went with y because q". If you later discover that q was invalid, you can go back and try one of the other ones instead.
We can look into (2), however since Python knows nothing about the Arma script execution, we would have to see if we can call out to Python from within Arma to correctly time the screenshots, or at least find some way to synchronize the timing between moving the camera position in Arma and then taking the screenshot via Python. I am not sure as to the difficulty level of achieving this.
As for (1), the reason I suggested shutil
is that within the documentation for Python's os
module, it mentions that
for high-level file and directory handling see the shutil module
and it looks like the shutil.move
function is good enough for what we need to do (and is customizable if we want to change the copy function that gets called). If you think it is better to use the lower-level functions provided in os
, that is fine too.
Seems like sound reasoning, makes sense to me. Good luck, and have fun!
Use Python to create a way to manage the images once they have been captured in Arma 3