Trying to run this code in the main function of a console app in QT but it only starts up the Blender GUI. These arguments should be starting a background render.
I tested the arguments to be correct and they work fine on CMD. This seems to be a blender specific issue but I might be wrong. It seems as though, using QProcess it doesn't allow for Blender to use the arguments. It launches the app without passing any arguments.
QProcess myProcess;
QString blender = "C:/Program Files/Blender Foundation/Blender/blender.exe";
QStringList arguments;
arguments << "blender" << "-b" << "E:/my/file.blend" << "-o" << " E:/my/output/folder/"<< "-a";
myProcess.start(blender,arguments);
Edit:
So browsing through SO, I found something that's working but this isn't using the QT functionality. I'd rather find the QT way of doing this. What it's essentially doing is running CMD and launching blender through the CMD. Is there a way I can do this using QT?
QDir::setCurrent(blender);
system("blender -b E:\\Blender\\BlendSwap\\55510_Ciclos_Town_-_10_Male_Characters\\cidade_ciclos-bonecos.blend -o E:\\Blender\\BlendSwap\\55510_Ciclos_Town_-_10_Male_Characters\\exp\\frame_### -a");