{"id":6126,"date":"2020-07-17T13:28:02","date_gmt":"2020-07-17T13:28:02","guid":{"rendered":"https:\/\/bssrdf.com\/?post_type=manual_documentation&#038;p=6126"},"modified":"2022-11-01T15:28:17","modified_gmt":"2022-11-01T14:28:17","slug":"exposed-headless-scripting-functionality","status":"publish","type":"manual_documentation","link":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/","title":{"rendered":"Headless Scripting"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">On this page<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a53963845bba\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ffffff;color:#ffffff\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ffffff;color:#ffffff\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a53963845bba\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/#Headless_Usage\" >Headless Usage<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/#Options\" >Options<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/#Headless_scripting_documentation\" >Headless scripting documentation<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">Headless scripting is a Pro feature, and only available with KeyShot 9.3 or newer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This page describes the various functions, classes, and constants exposed when running KeyShot in headless mode.<br>Note that only a subset of the scripting functionality in KeyShot can currently be used through headless scripting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Headless-Usage\"><span class=\"ez-toc-section\" id=\"Headless_Usage\"><\/span>Headless Usage<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For headless usage on macOS use the following executable:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>keyshot -headless [options] [scene path] -script &lt;script path&gt; [script arguments]<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This executable is also still in use on Windows for backwards compatibility. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For <em>stdin<\/em> (standard input) and <em>stdout<\/em> (standard output) on Windows use new KeyShot headless executable: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>keyshot_headless [options] [scene path] -script &lt;script path&gt; [script arguments]<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can for example use the <em>stdout<\/em> to output the script to a file by using the <em>redirect operator<\/em> &#8220;&gt;&#8221; or &#8220;&gt;&gt;&#8221;. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The executable would then look like this:<br><code>keyshot_headless -script &lt;script path&gt; [script arguments] &gt; logfile.txt<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Options\"><span class=\"ez-toc-section\" id=\"Options\"><\/span>Options<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can open the options by entering <code>keyshot -help -headless<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will show you the following in your terminal:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-xlic &lt;external license folder&gt;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-floating_license_server &lt;FlexLM server&gt;<\/code><\/p>\n\n\n\n<div class=\"wp-block-genesis-blocks-gb-columns gb-layout-columns-1 one-column\"><div class=\"gb-layout-column-wrap gb-block-layout-column-gap-2 gb-is-responsive-column\">\n<div class=\"wp-block-genesis-blocks-gb-column info-box gb-block-layout-column\"><div class=\"gb-block-layout-column-inner\">\n<h6 class=\"wp-block-heading\" id=\"note\">Note<\/h6>\n\n\n\n<p class=\"wp-block-paragraph\">The server must be preceeded with &#8220;@&#8221; when default port is used and &#8220;port@&#8221; if not.<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-floating_feature &lt;FlexLM feature&gt; (&lt;NR cores&gt;)<\/code><br>Accepted FlexLM features:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>keyshot2 (Pro)<\/li><li>keyshot_enterprise<\/li><li>keyshot_network_rendering (NR, checks out all cores if &lt;NR cores&gt; is not specified)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-subscription &lt;email&gt; &lt;password&gt; &lt;product code&gt;<\/code><br>Use subscription. Email, password and product code can be left out individually by using &#8216;-&#8216;. Unspecified information will be asked for on CLI unless already known in settings file from prior sign in. The product code can be used for choosing a specific product without choosing from the list of available products.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-deactivate-on-exit<\/code><br>Deactivate subscription seat when exiting program. Otherwise, the seat is kept for future invocations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-generateconfig [no cloud] [no auto-update] [FlexLM server] [FlexLM feature]<\/code><br>Generates a config file in the KeyShot resource folder. Unrelated to headless: KeyShot Cloud is disabled if [no cloud] is &#8216;1&#8217;, and auto-update checking is disabled if [no auto-update] is &#8216;1&#8217;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code> [FlexLM server]<\/code> and <code>[FlexLM feature]<\/code> can be skipped by using &#8216;-&#8216;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-progress<\/code><br>Writes rendering progress on stdout, e.g. &#8216;Rendering: xxx.x%&#8217;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locally configured node-locked, floating licenses or subscription in the settings file will automatically be used if no arguments are given to override them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Headless-scripting-documentation\"><span class=\"ez-toc-section\" id=\"Headless_scripting_documentation\"><\/span>Headless scripting documentation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The full documentation for  functions, classes and constants, can be found as part of the KeyShot Scripting Documentation, <a href=\"https:\/\/media.keyshot.com\/scripting\/headless_doc\/11.3\/index.html\">here<\/a>.<\/p>\n","protected":false},"author":29916,"featured_media":0,"parent":15962,"menu_order":11,"template":"","manualdocumentationcategory":[13],"manual_doc_tag":[],"class_list":["post-6126","manual_documentation","type-manual_documentation","status-publish","hentry","manualdocumentationcategory-keyshot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Headless Scripting - KeyShot 11 Manual<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Headless Scripting - KeyShot 11 Manual\" \/>\n<meta property=\"og:description\" content=\"Headless scripting is a Pro feature, and only available with KeyShot 9.3 or newer. This page describes the various functions, classes, and constants exposed when running KeyShot in headless mode.Note that only a subset of the scripting functionality in KeyShot can currently be used through headless scripting. Headless Usage For headless usage on macOS use [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/\" \/>\n<meta property=\"og:site_name\" content=\"KeyShot 11 Manual\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-01T14:28:17+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/manual\\\/scripting\\\/exposed-headless-scripting-functionality\\\/\",\"url\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/manual\\\/scripting\\\/exposed-headless-scripting-functionality\\\/\",\"name\":\"Headless Scripting - KeyShot 11 Manual\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/#website\"},\"datePublished\":\"2020-07-17T13:28:02+00:00\",\"dateModified\":\"2022-11-01T14:28:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/manual\\\/scripting\\\/exposed-headless-scripting-functionality\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/manual\\\/scripting\\\/exposed-headless-scripting-functionality\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/manual\\\/scripting\\\/exposed-headless-scripting-functionality\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scripting\",\"item\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/manual\\\/scripting\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Headless Scripting\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/#website\",\"url\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/\",\"name\":\"KeyShot 11 Manual\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/manual.keyshot.com\\\/keyshot11\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Headless Scripting - KeyShot 11 Manual","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/","og_locale":"en_US","og_type":"article","og_title":"Headless Scripting - KeyShot 11 Manual","og_description":"Headless scripting is a Pro feature, and only available with KeyShot 9.3 or newer. This page describes the various functions, classes, and constants exposed when running KeyShot in headless mode.Note that only a subset of the scripting functionality in KeyShot can currently be used through headless scripting. Headless Usage For headless usage on macOS use [&hellip;]","og_url":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/","og_site_name":"KeyShot 11 Manual","article_modified_time":"2022-11-01T14:28:17+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/","url":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/","name":"Headless Scripting - KeyShot 11 Manual","isPartOf":{"@id":"https:\/\/manual.keyshot.com\/keyshot11\/#website"},"datePublished":"2020-07-17T13:28:02+00:00","dateModified":"2022-11-01T14:28:17+00:00","breadcrumb":{"@id":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/exposed-headless-scripting-functionality\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/manual.keyshot.com\/keyshot11\/"},{"@type":"ListItem","position":2,"name":"Scripting","item":"https:\/\/manual.keyshot.com\/keyshot11\/manual\/scripting\/"},{"@type":"ListItem","position":3,"name":"Headless Scripting"}]},{"@type":"WebSite","@id":"https:\/\/manual.keyshot.com\/keyshot11\/#website","url":"https:\/\/manual.keyshot.com\/keyshot11\/","name":"KeyShot 11 Manual","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/manual.keyshot.com\/keyshot11\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/manual_documentation\/6126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/manual_documentation"}],"about":[{"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/types\/manual_documentation"}],"author":[{"embeddable":true,"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/users\/29916"}],"version-history":[{"count":0,"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/manual_documentation\/6126\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/manual_documentation\/15962"}],"wp:attachment":[{"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/media?parent=6126"}],"wp:term":[{"taxonomy":"manualdocumentationcategory","embeddable":true,"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/manualdocumentationcategory?post=6126"},{"taxonomy":"manual_doc_tag","embeddable":true,"href":"https:\/\/manual.keyshot.com\/keyshot11\/wp-json\/wp\/v2\/manual_doc_tag?post=6126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}