The "Path Maker" add-on allows you to write tags in some output paths. Tags will be replace at render time by a string generated with a line of code, a python script or an hardcoded string.
The addon can be used with CLI with the --addons flag:
blender -b /path/to/file.blend --addons blender_path_maker
It supports:
Tag Type dropdown:
bpy.context.scene.name)toto\hello\world)For example:
The tag (filename) can be replace by bpy.path.display_name_from_filepath(bpy.data.filepath) so that an Output Path like C:/hello/(filename)/world will now be C:/hello/file_name/world.
Example for a script:
import bpy
def run():
version = bpy.app.version_string
return version
The python script has to have a function definition named run that returns a string.
This extension does not require special permissions.
Very useful! Is it possible to set name of the filename, not just the /folder? I got it working with png, but can't see a 'file subpath' option for exr output?
The EXR output path work's the same as PNG. You can have a path like "C:/hello/world/image_###.exr" The folder would be "C:/hello/world/" and the filename would be "image_####.exr" where #### is the frame number. And you can use the add-on in either of these parts of the path.
I really like that addon, since it makes Output Paths behave like Maya and it should be Standard.
At first it worked. After Rendering an Animation in Evee it replaced the Token with the full output path.
Afterward it didn´t work anymore. I get the error message "could not open file for Rendering".
This workflow should be standard in Blender. I really hope the dev make it happen
Hi, Thanks for the review :) I didn't manage to reproduce the error, do you think you could provide the tokens you are using, and the output path with the token written in it when you have the error ? And if it is possible, a copy of the error message from the console (the one you can show by going to "Window > Toggle System Console"). Thanks again !
Brilliant extension, should be in the default install. Would like a little more documentation, e.g. how to use scripts vs expressions (I'm thinking that's what I need to do to use regex, e.g. to get the version number of a project file, but I'm having to guess how to do it). Thanks for the help with the CLI rendering!