general:scripting

You can manage 3DСoat features with help of scripting.
Run or create new commands using scripting or compiling them by accessing the Core API.

The start is quite easy. Just use Scripts MenuCreate your Script or Create new Core API script.


. Scripts Menu

- Scripting is a series of commands that are able to be executed without the need for compiling.
When we select a tool or execute a function we are executing a command already included in the program. Creating a script allows us to combine these commands to automatically execute a series of steps that speed up our work.

- Core API (Application Programming Interface) is not just the scripting, the code you write runs at full speed of compiled C++.
It is the powerful method to extend the 3DCoat's functionality. You may automate the job or add principally new tools.

3DCoat Scripting

3DCoat uses AngelScript, which is a C++ like language. The script is a text file with commands that are executed in personal order.

That command can be known by recording it in memory by pressing over the function RMB+MMB at the same time. Opening a notepad and pasting it we will obtain the text of the corresponding command. It is helpful to view and edit it in Notepad++ (choose “C” syntax). Then run script via file menu “Scripts / Run Script”.

Core API introduction

The Core API is the powerful method to extend the 3DCoat's functionality. You may automate the job or add principally new tools.
This is not just the scripting, the code you write runs at full speed of compiled C++.

Core API script is a compliable C++17 program, so it works on the full native C++ speed. This is far more than just a script; you may make even time-critical and multithreaded tasks and customize the 3DCoat in-depth, creating principally new functionality and tools.

But the whole process is completely transparent for you. You don't need to configure anything or manage complex project configurations. 3DCoat will lead you through the whole process with a simple wizard.

* Core API works correctly for users with non-english user names, all the installing process is now super easy and straightforward.

* The CoreAPI compiling process changed essentially. Now only Visual Studio used, no need clang-cl. It simplifies usage because you need install only one additional software, not two as before. The download and install process completely automated.

* Core API supports colored voxels as well.


How to begin ?

The start is quite easy. Just use Scripts→Create new Core API script
Then choose the template, choose path for your project.

If the Visual studio (or Visual Studio Code) installed it will start with your new file. Each example is well documented, used relatively simple syntax, so it is easy to understand from easy to complex.

You don't need to set any standard syntax in VStudio.
Just type code and execute in 3DCoat, not in Visual Studio.
VStudio is just like a text editor there that may show hints and help while coding.
Write your code on VStudio and save the *.cpp, open it in 3DC and it automatically runs.

Examples

Looking the Examples is the best way to understand the API.

Use Scripts→Create new Core API script to experiment with that examples.

  • general/scripting.txt
  • Last modified: 2022/07/03 09:51
  • by carlosan