Addon Blender command line render script generator

Hi folks,
I have created a simple addon which will help to automate codes for command line render in Blender. So that artists and sysadmins can relax for a while.

Download: https://github.com/cgvirus/Blender_Addon_commandline_render_script_generator

PS: If there are any Mac user, if you can, please check it and confirm if it’s working or not. That would be really helpful. Thanks all.

Detail:

1 Like

Hi, thanks for this, seems great ! i tried to install and try it on Windows 10, and this error message pops up every time :


anyway thanks a lot for the script, eager to try it :smiley:

Hi have you specified your render output directory?

yes , there is an output directory specifiied

PS. EDIT: Please see video tut: timecode : 10:58

I can’t recreate the error. Can you please take a snap shot of your render settings> output directory? That would be helpful.
The error is most likely your output path for render images…

It should be like that in output directory:


I tried with same tmp and got the same error with Linux as well. But if you can get a snapshot of yours that would be great.

This idea gives me the chance to remember an old project that has never been realized, but that would be nice e useful. To create a custom linux distribution that contains the following features :

A list of questions to understand what kind of user will use blender like these :

  1. do you want to use the most stable blender version or the development version ?
  2. in which part of blender do you want to focus today ? (modelling,texturing,rigging,animation,etc) ?
  3. depending on the answer,a standard blender installation will start and it will contains a series of settings and plugins,that can be modified later
  4. a system to keep updated the plugins and blender
  5. a series of script to optimize the rendering stage and the various blender functions…

I’m not a python programmer,so I don’t know how to do that,but I can give some ideas…

Hey sorry it xas at work, don t have the project here, ill try to post it tomorrow ! Thanks for quick reply !

I love this little addon. :slight_smile: It’s so much easier to just click a button than to remember the command-line and foldernames yourself… :slight_smile: Good one!

Thank you so much.

It can be done as an external standalone application, but I afraid it will break Blender release cycle rules, plugin dependency and overall blender infrastructure…Cause plugins of one version of Blender may not be compatible with another one.

Thanks and enjoy :slight_smile:

Greetings!

I am trying to install the add-on in Linux Ubuntu 17.10 with Blender 2.79 from ppa.

I try to install the addon using the normal procedure. I get a message that the file is install in ~/.config/blender/2.79/scripts/addons

However, it does not appear in the list of the addons even after saving and restarting Blender.

I tried to copy it in /usr/share/blender/2.79/scripts/addons but again it does not appear. Neither do I have the button in Blender GUI.

Please advise. I am very motivated to make this work. I need it for my video projects at work.
Thanks,
Enrico

Hi instead of using PPA can you use tarball installation?

https://www.blender.org/download/Blender2.79/blender-2.79-linux-glibc219-x86_64.tar.bz2/

I am in vacation right now. Will test it after a week or so. But tested it in win, Fedora and Mint before release through standard tarball and msi blender installation.

I installed the tarball version of blender in /opt and started from CLI. Hopefully the following error messages are helpful:

henk@belvoir:/opt/blender-2.79-linux-glibc219-x86_64$ ./blender
Read prefs: /home/henk/.config/blender/2.79/config/userpref.blend
found bundled python: /opt/blender-2.79-linux-glibc219-x86_64/2.79/python
measureit: Imported multifiles
fake_module: addon missing ‘bl_info’ gives bad performance!: ‘/home/henk/.config/blender/2.79/scripts/addons/commandline_render_script_generator.py’
fake_module: addon missing ‘bl_info’ gives bad performance!: ‘/home/henk/.config/blender/2.79/scripts/addons/commandline_render_script_generator.py’
fake_module: addon missing ‘bl_info’ gives bad performance!: ‘/home/henk/.config/blender/2.79/scripts/addons/commandline_render_script_generator.py’
Modules Installed () from ‘/home/henk/Downloads/commandline_render_script_generator.py’ into ‘/home/henk/.config/blender/2.79/scripts/addons’

The file that I was trying to install was corrupted. Found a proper py file and now it works.

However, the script file that it creates is simply “.sh” and hence does not appear unless you use “ls -a”

I looked at the code and the reason could be that

textfile = open(str(renderdir)+“.sh”,“w”)

does not have the blender project file stored anywhere. It is in the variable “projectfile”, but it is not used to create the file name.

I guess I am missing something because that should have been noticed previously.

Thanks,
Enrico

Hi thanks for the feedback. I have updated the bl info…
Have you saved the Blender project and specified the render file directory and render file name? What does it create after pressing the generate button?

Hey.

Thanks for the script. I tried the 2.8 version and there are some things not working properly.

  1. In the first line there are two " at the beginning of the path.
  2. In Windows (at least Windows 7), after cd “X:…” you need to go to the drive with “X:”. Otherwise blender.exe will not be found.

Hi, I was updating the addon today. Although I have not understood your problem entirely, have fixed some relative path issues and auto directory creation we needed for our server.

Tested with Win 10 and LNX. Seems working fine. If there are any error shows in the prompt please copy- paste that. It’s easier to understand in this way.
Thanks.

1 Like

When you change a path with cd “X:\Some Path” you change the path on X: but you don’t find yourself on drive X: afterwards. You still have to switch to X: by typing “X:” after that. Otherwise you aren’t in the same directory as blender.exe.
The other issue is that there are two “” in front of the “cd”-path in the batch file. There should only be one ".

Here are the two lines of the batch file that the addon created. As you can see, the first line has two “” in front of the path.

cd ““F:\Programme_Fix\Blender Foundation\blender-2.80-windows64_ecycles”
blender -b “D:\Temp\aaaa.blend” -o “D:\Temp\bbb#####” -s 1 -e 250 -a”

Hi thanks for the feedback, I have fixed the typo for windows. But I am not sure why you need to change the path.

Our workflow with WINDOWS is:
1. Save the blender file with everything setup (timeframe, render engine, render file path).
2. Generate the script.
3. Go to that folder where the script is and just double click it. 
(It should be in the render path you have set)
4. Command promt will open up and render starts

For LINUX and MAC everything is same, just instead of double clicking you need to cd to that render folder and do
sh yourrenderscript.sh

The blender.exe location is already attached in the script in your case:
“F:\Programme_Fix\Blender Foundation\blender-2.80-windows64_ecycles”

Let me know your intended workflow please and will see.
Thanks

1 Like