execute_render: Execute a Python script in Blender

Description Usage Arguments Value

View source: R/execute_render.R

Description

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!

Usage

1
execute_render(script, blender = NULL, flags = NULL, addons = NULL)

Arguments

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.

Value

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.


mikemahoney218/mvdf documentation built on May 7, 2021, 11:46 a.m.