Hello, I would love to know how can i set terminal command in linux terminal that can load blender without UI but with CroudRender to listen, and waiting for jobs. Thank you for answer.
Thanks so much for your post :) This can be done, I've put some instructions below to try.
You need to issue a command for blender to run in background mode, to do this in Linux, you need to find the path to the blender executable and then you need to add some further options to the command line like this.
This is assuming you are using 2.79, if you want to use one of the 2.78 releases then you will need to replace each "79" with "78" in the command above.
Please post back and let me know that this worked :)
Feb 22, 2018
Thanks I was wondering this too, I'll test it when I get home tonight and let you know.
May 31, 2018
It does not seem to work with Windows. I have tried running the command:
File "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py", line 64, in <module>
Hi, ummmmmm Mr Nameless? I am guessing you do actually have a name ,but we respect your anonymity here so I'll just refer to you as QN if thats ok?
So, the post above is out of date now, sorry I haven't updated it yet, basically the old software used position of the arguments on the command line to do stuff. Now we use things like "-t" "server_interface" which can be in any order.
The correct way to do this now is to write it like this:
The option -t now preceeds the "server_int_proc" string and is shorthand for "what type of background process should this be?"
Please bear in mind that what I just wrote works for v0.1.4 and above (0.1.5 currently in dev, due out soon will be the same and so on). If you happen to be using v0.1.3, then please reply back, there's likely another issue we'll need to work out with you.
J
May 31, 2018
Referring to me as QN is fine.
I am using v0.1.4. I also added Blender to my PATH so "*path_to_blender_exe*" is just "blender" for me.
But I still get the same error message. Here is the full output:
found bundled python: C:\Program Files\Blender Foundation\Blender\2.79\python
path not found
path not found
module changed on disk: C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\__init__.py reloading...
Crowd Render Server Interface Process ready
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py", line 64, in <module>
Hi again :), I tried the same syntax you have above, got the same error, but it works if you use all backslashes. The problem appears to be the forward slash in:
Replacing this with a backslash works for me on win7.
I think the issue here is that this string is first parsed by python, which likely is expecting to see backslahses and coughs on the forward slash yielding a path that ends up causing the issue. Let me know if replacing with a backslash fixes this for you :D
J.
Jun 4, 2018
It works!
Using only forward slashes works with Windows 10 also:
Is it possible to run the job on the renderer via the Linux command line, with predefined parameters?
And it's not entirely clear what gives the launch in the background, as described above? Debian 9 crashes blender: error: unrecognized arguments: server_int_proc (blender 2.79b)
On other pure systems with Debian 9 other errors ...
Hi lab137 :), sorry for the late reply, for some reason I am not getting notifications of some comments, usually when we get a comment in the forum or a new post we're onto it pretty quickly.
Ok, What was the exact command you ran that didn't work? You mention "the command above" but there are several, if you can reply with the exact command copied from your terminal and the accompanying failure message, I can be of more help :)
James
Jun 25, 2018
Hi, I launch as follows:
The blender itself is not installed, unpacked and launched.
Hi lab137, from what I can see, you may be missing a command switch if you are using a version later than 013. From version 014 onwards the headless rendering setup requires using the following command:
./blender -b -P /home/*your user name*/.config/blender/2.79/addons/crowdrender/src/bl_2_79/serv_int_start.py -- -t "server_int_proc"
It may also be that blender is not aware of the path of the addons folder. One way to be sure is to run the following command in the python console (available using the scripting view):
I've included the output on my machine, you can see that the path exists for /Blender/2.79/scripts which is where the addons/crowdrender folder needs to be. Its possible that it could be missing from the blender you are running. One way to get around that is to save your user prefs after you add this path for your system. You can add it in the user preferences > file tab where it says "Scripts:"
Reply back to let us know if this works for you :D
Jun 26, 2018
Hi James!
Added a path in the settings, saved, but everything is still, maybe something is not correctly understood
This might actually be the right path to check, apologies but I think I gave you the incorrect command before. Try this one, I think you'll need to add /home/Denis/.config/Blender/2.79/scripts/addons instead of just the path to "scripts"
Jun 26, 2018
Do you need to insert several paths in the script field? I tried to insert '/home/denis/Downloads/blender-2.79b-linux-glibc219-x86_64/blender-2.79b-linux-glibc219-x86_64/2.79/scripts/addons',' /home/denis/.config/blender /2.79/scripts/addon'
Hi Lab137, no, if you have the scripts/addons path returned from the command you ran (and I can see you do) then you've got the correct setup. Can I ask what version of crowdrender are you using?
Hi lab137, ok, I'm going to send you a copy of v015, its in pre-release but, it may solve this issue because the version no longer imports its self in the way that is failing in your case. It may remedy the situation, I have your e-mail address so standby to receive a download link with some more instructions :)
Hi Lab137, ok its telling us that the addon can't be found. This is odd since what you've shown me so far is that the addon path is set correctly. If you look at your addons tab in user preferences is crowdrender there? If you can open blender from the terminal using ./blender from the same directory as you entered the command you did in the image you just posted that will help. We need to ensure that the addon is being recognised by blender.
Hi Tomas,
Thanks so much for your post :) This can be done, I've put some instructions below to try.
You need to issue a command for blender to run in background mode, to do this in Linux, you need to find the path to the blender executable and then you need to add some further options to the command line like this.
*path_to_blender_binary* -b -P /home/*your_user_name*/.config/blender/2.79/scripts/addons/crowdrender/Linux/bl_2_79/serv_int_start.py -- "server_int_proc"
This is assuming you are using 2.79, if you want to use one of the 2.78 releases then you will need to replace each "79" with "78" in the command above.
Please post back and let me know that this worked :)
Thanks I was wondering this too, I'll test it when I get home tonight and let you know.
It does not seem to work with Windows. I have tried running the command:
blender -b -P "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py" -- "server_int_proc"
but I get the error message:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py", line 64, in <module>
machine_manager = server_interface.CRMachineManager()
NameError: name 'server_interface' is not defined
Hi, ummmmmm Mr Nameless? I am guessing you do actually have a name ,but we respect your anonymity here so I'll just refer to you as QN if thats ok?
So, the post above is out of date now, sorry I haven't updated it yet, basically the old software used position of the arguments on the command line to do stuff. Now we use things like "-t" "server_interface" which can be in any order.
The correct way to do this now is to write it like this:
*path_to_blender_exe* -b -P "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py" -- -t "server_int_proc"
The option -t now preceeds the "server_int_proc" string and is shorthand for "what type of background process should this be?"
Please bear in mind that what I just wrote works for v0.1.4 and above (0.1.5 currently in dev, due out soon will be the same and so on). If you happen to be using v0.1.3, then please reply back, there's likely another issue we'll need to work out with you.
J
Referring to me as QN is fine.
I am using v0.1.4. I also added Blender to my PATH so "*path_to_blender_exe*" is just "blender" for me.
I tried with "-t":
blender -b -P "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py" -- -t "server_int_proc"
But I still get the same error message. Here is the full output:
found bundled python: C:\Program Files\Blender Foundation\Blender\2.79\python
path not found
path not found
module changed on disk: C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\__init__.py reloading...
Crowd Render Server Interface Process ready
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py", line 64, in <module>
machine_manager = server_interface.CRMachineManager()
NameError: name 'server_interface' is not defined
Blender quit
Hi again :), I tried the same syntax you have above, got the same error, but it works if you use all backslashes. The problem appears to be the forward slash in:
'Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79/serv_int_start.py"
Replacing this with a backslash works for me on win7.
I think the issue here is that this string is first parsed by python, which likely is expecting to see backslahses and coughs on the forward slash yielding a path that ends up causing the issue. Let me know if replacing with a backslash fixes this for you :D
J.
It works!
Using only forward slashes works with Windows 10 also:
blender -b -P "C:\Users\QuiteNameless\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\crowdrender\src\bl_2_79\serv_int_start.py" -- -t "server_int_proc"
Thanks James!
Great! No worries as we say down under :D
Hi!
Is it possible to run the job on the renderer via the Linux command line, with predefined parameters?
And it's not entirely clear what gives the launch in the background, as described above? Debian 9 crashes blender: error: unrecognized arguments: server_int_proc (blender 2.79b)
On other pure systems with Debian 9 other errors ...
Hi lab137 :), sorry for the late reply, for some reason I am not getting notifications of some comments, usually when we get a comment in the forum or a new post we're onto it pretty quickly.
Ok, What was the exact command you ran that didn't work? You mention "the command above" but there are several, if you can reply with the exact command copied from your terminal and the accompanying failure message, I can be of more help :)
James
Hi, I launch as follows:
The blender itself is not installed, unpacked and launched.
Hi lab137, from what I can see, you may be missing a command switch if you are using a version later than 013. From version 014 onwards the headless rendering setup requires using the following command:
./blender -b -P /home/*your user name*/.config/blender/2.79/addons/crowdrender/src/bl_2_79/serv_int_start.py -- -t "server_int_proc"
It may also be that blender is not aware of the path of the addons folder. One way to be sure is to run the following command in the python console (available using the scripting view):
>>> bpy.utils.script_paths()
['/Applications/Blender/blender.app/Contents/Resources/2.79/scripts/modules', '/Applications/Blender/blender.app/Contents/Resources/2.79/scripts', '/Users/jamesmac/Library/Application Support/Blender/2.79/scripts']
I've included the output on my machine, you can see that the path exists for /Blender/2.79/scripts which is where the addons/crowdrender folder needs to be. Its possible that it could be missing from the blender you are running. One way to get around that is to save your user prefs after you add this path for your system. You can add it in the user preferences > file tab where it says "Scripts:"
Reply back to let us know if this works for you :D
Hi James!
Added a path in the settings, saved, but everything is still, maybe something is not correctly understood
Hi Lab137 can you try:
>>> bpy.utils.script_paths(subdir="addons")
['/Applications/Blender/blender.app/Contents/Resources/2.79/scripts/addons', '/Users/jamesmac/Library/Application Support/Blender/2.79/scripts/addons']
This might actually be the right path to check, apologies but I think I gave you the incorrect command before. Try this one, I think you'll need to add /home/Denis/.config/Blender/2.79/scripts/addons instead of just the path to "scripts"
Do you need to insert several paths in the script field? I tried to insert '/home/denis/Downloads/blender-2.79b-linux-glibc219-x86_64/blender-2.79b-linux-glibc219-x86_64/2.79/scripts/addons',' /home/denis/.config/blender /2.79/scripts/addon'
but the result is the same.
Hi Lab137, no, if you have the scripts/addons path returned from the command you ran (and I can see you do) then you've got the correct setup. Can I ask what version of crowdrender are you using?
Yes, of course, James!
Hi lab137, ok, I'm going to send you a copy of v015, its in pre-release but, it may solve this issue because the version no longer imports its self in the way that is failing in your case. It may remedy the situation, I have your e-mail address so standby to receive a download link with some more instructions :)
Thanks James, I checked, here's the new error:
Hi Lab137, ok its telling us that the addon can't be found. This is odd since what you've shown me so far is that the addon path is set correctly. If you look at your addons tab in user preferences is crowdrender there? If you can open blender from the terminal using ./blender from the same directory as you entered the command you did in the image you just posted that will help. We need to ensure that the addon is being recognised by blender.