Author Topic: Read Me First  (Read 3577 times)

0 Members and 1 Guest are viewing this topic.

Offline Morten Kristensen

  • root
  • Administrator
  • Full Member
  • *****
  • Posts: 128
  • Software Engineer, Luxion
Read Me First
« on: November 13, 2015, 04:09:07 am »
Scripting, in the form of Python, is supported with Python 3.4 as of KeyShot 6 and Python 3.6 as of KeyShot 7.3 and all questions, tips and tricks will be contained in this board.
Feel free to ask and share your findings with scripting.

Don't send me private messages asking for help, please. Write a forum post about it.

If you want to share code more than 5-10 lines then please either upload the file as an attachment or post a link to the code instead (like https://gist.github.com or http://pastie.org).

Common answers will be put here continually for easy access to ones new to scripting.

API documentation can be found here: https://keyshot.com/scripting/doc/8.1/
For a quick start to scripting go here: https://keyshot.com/scripting/doc/8.1/quickstart.html

To learn Python as a beginner go here: http://www.learnpython.org
Or for more depth: http://www.diveintopython3.net

Troubleshooting

Module not found
If you get an error similar to

ImportError: No module named 'X'

where you substitute "X" with the module name (it could be "bisect", for instance) then it might be something left out of the KeyShot distribution. A workaround for this is to enable KeyShot to use a locally installed Python's modules. Install Python 3.6 (must be 64-bit if you run 64-bit KeyShot and 32-bit otherwise) to C:\Python or C:\Python36 if on Windows. On Unix-like systems just install using your package manager. In both cases it will try to automatically detect the installation. Finally restart KeyShot and try the script again.
« Last Edit: November 23, 2018, 02:46:01 am by Morten Kristensen »