palhano wrote:Hello development team.
Is there a way to expose Lua API to external applications?
Something like Southpaw's Tactic,which is a digital asset management tool, so that it can automate workflow?
Or at least is there any command line option to run a Lua script?
Yes, there is.
You can get all command line options by calling
on the command line. This what you then get (see
--script
and
--script-args
):
Code: Select all
USAGE:
octane [--script-args <string>] [--script <string>] [--benchmark]
[--no-opengl] [-t <node name>] [-m <string>] [-R <node
name=filename>] ... [-r <filename>] [-l <filename>] [-n
<filename>] [--imager-exposure <float>] [--daylight-sundir-z
<float>] [--daylight-sundir-y <float>] [--daylight-sundir-x
<float>] [--cam-lensshift-right <float>] [--cam-lensshift-up
<float>] [--cam-aperture <float>] [--cam-focaldepth <float>]
[--cam-scale <float>] [--cam-fov <float>] [--cam-motion-up-z
<float>] [--cam-motion-up-y <float>] [--cam-motion-up-x <float>]
[--cam-motion-target-z <float>] [--cam-motion-target-y <float>]
[--cam-motion-target-x <float>] [--cam-motion-pos-z <float>]
[--cam-motion-pos-y <float>] [--cam-motion-pos-x <float>]
[--cam-up-z <float>] [--cam-up-y <float>] [--cam-up-x <float>]
[--cam-target-z <float>] [--cam-target-y <float>]
[--cam-target-x <float>] [--cam-pos-z <float>] [--cam-pos-y
<float>] [--cam-pos-x <float>] [--stop-after-script] [--no-gui]
[-q] [-g <int>] ... [-s <int>] [--output-exr-tm <filename>]
[--output-exr <filename>] [--output-png16 <filename>] [-o
<filename>] [--film-height <int>] [--film-width <int>] [-e] [--]
[--version] [-h] <filename>
Where:
--script-args <string>
string passed verbatim to script in arg[1]
--script <string>
Filename of the script to execute.
--benchmark
Run the benchmark suite.
--no-opengl
Force software display
-t <node name>, --target-node <node name>
Name of the render target node to render
-m <string>, --mesh-node <string>
Name of the mesh node to render.
-R <node name=filename>, --relink <node name=filename> (accepted
multiple times)
Relink additional mesh nodes in the file.
-r <filename>, --relink-meshnode <filename>
Load the given OBJ mesh file into the mesh node given with
--mesh-node.
-l <filename>, --link-meshnode <filename>
Create a new mesh node from the given OBJ mesh file
-n <filename>, --new <filename>
Create a new OCS project file from given command line arguments
--imager-exposure <float>
Imager Exposure Amount
--daylight-sundir-z <float>
Daylight Sun Direction Vector Z Component
--daylight-sundir-y <float>
Daylight Sun Direction Vector Y Component
--daylight-sundir-x <float>
Daylight Sun Direction Vector X Component
--cam-lensshift-right <float>
Lens Shift Right
--cam-lensshift-up <float>
Lens Shift Up
--cam-aperture <float>
Camera Aperture Radius
--cam-focaldepth <float>
Camera Focal Depth
--cam-scale <float>
Orthographic Camera Horizontal Scale
--cam-fov <float>
Camera Horizontal FOV (degrees)
--cam-motion-up-z <float>
Camera Up Motion 2nd Vector Z Component
--cam-motion-up-y <float>
Camera Up Motion 2nd Vector Y Component
--cam-motion-up-x <float>
Camera Up Motion 2nd Vector X Component
--cam-motion-target-z <float>
Camera Target Motion 2nd Position Z Component
--cam-motion-target-y <float>
Camera Target Motion 2nd Position Y Component
--cam-motion-target-x <float>
Camera Target Motion 2nd Position X Component
--cam-motion-pos-z <float>
Camera Motion 2nd Position Z Component
--cam-motion-pos-y <float>
Camera Motion 2nd Position Y Component
--cam-motion-pos-x <float>
Camera Motion 2nd Position X Component
--cam-up-z <float>
Camera Up Vector Z Component
--cam-up-y <float>
Camera Up Vector Y Component
--cam-up-x <float>
Camera Up Vector X Component
--cam-target-z <float>
Camera Target Position Z Component
--cam-target-y <float>
Camera Target Position Y Component
--cam-target-x <float>
Camera Target Position X Component
--cam-pos-z <float>
Camera Position Z Component
--cam-pos-y <float>
Camera Position Y Component
--cam-pos-x <float>
Camera Position X Component
--stop-after-script
Stops Octane after the specified script has finished - this is
implicitely enabled, if --no-gui is set
--no-gui
Disables the creation of a user interface if a script file is
specified
-q, --quiet
Start Application without splash and minimized window
-g <int>, --gpu <int> (accepted multiple times)
add GPU device to use for rendering (0 = first)
-s <int>, --samples <int>
Maximum number of samples per pixel (maxsamples)
--output-exr-tm <filename>
Output tonemapped EXR image file when maxsamples is reached
--output-exr <filename>
Output EXR image file when maxsamples is reached
--output-png16 <filename>
Output 16-bit PNG image file when maxsamples is reached
-o <filename>, --output-png <filename>
Output PNG image file when maxsamples is reached
--film-height <int>
Film height
--film-width <int>
Film width
-e, --exit
Close the application when rendering is done
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
<filename>
.OCS Project scene file
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra