This function takes a Python script and executes it via the Blender 3D rendering program. While the intent of this function is to take scripts generated by `mvdf` and related packages and use them to produce 3D renderings, neither this function nor Blender validates the script -- so be careful when executing Python scripts you haven't generated yourself, as scripts run in Blender have the same filesystem permissions as scripts you run on the terminal!
execute_render(script, blender = NULL, flags = NULL, addons = NULL)
script | The Python script (either as a file path or as a character vector with length 1) to execute. |
---|---|
blender | Path to the Blender executable to execute the Python script. If `NULL`, the default, uses the first result from `Sys.which("blender")`. |
flags | Additional command-line arguments to pass to `blender`. |
addons | A vector of Blender add-ons to enable on the command line. |
A length 1 character vector with the output file path is returned invisibly if the function can identify the file the Python script saves to. If the output file can't be identified, returns `NULL`, invisibly.