• 中文 (台灣)
  • 3DCoat文档
  • Chapters
    • Introduction to 3DCoat
    • Getting started
    • Interface
    • Brush Components
    • Workspaces Rooms
    • Scripting & Core API
    • 问题和答案
    • licensing
    • 培训教程
  • Pilgway
  • Products
    • 3DCoat
    • 3DCoatTextura
    • 3DCoatPrint
    • PBRLibrary
  • Blog Posts
  • Store
  • 中文 (台灣) 中文 (台灣)
    • English English
    • Українська Українська
    • Español Español
    • Deutsch Deutsch
    • Français Français
    • 日本語 日本語
    • Русский Русский
    • 한국어 한국어
    • Polski Polski
    • 中文 (中国) 中文 (中国)
    • Português Português
    • Italiano Italiano
    • Suomi Suomi
    • Svenska Svenska
    • Dansk Dansk
    • Slovenčina Slovenčina
    • Türkçe Türkçe
    • Nederlands Nederlands
    • Magyar Magyar
    • ไทย ไทย
    • हिन्दी हिन्दी
    • Ελληνικά Ελληνικά
    • Tiếng Việt Tiếng Việt
    • Lietuviškai Lietuviškai
    • Latviešu valoda Latviešu valoda
    • Eesti Eesti
    • Čeština Čeština
    • Română Română
    • Norsk Bokmål Norsk Bokmål
  • Creating 3D Character Using 3DCoat
  • 3DCoat文档
  • Chapters
    • Introduction to 3DCoat
    • Getting started
    • Interface
    • Brush Components
    • Workspaces Rooms
    • Scripting & Core API
    • 问题和答案
    • licensing
    • 培训教程
  • Pilgway
  • Products
    • 3DCoat
    • 3DCoatTextura
    • 3DCoatPrint
    • PBRLibrary
  • Blog Posts
  • Store
  • 中文 (台灣) 中文 (台灣)
    • English English
    • Українська Українська
    • Español Español
    • Deutsch Deutsch
    • Français Français
    • 日本語 日本語
    • Русский Русский
    • 한국어 한국어
    • Polski Polski
    • 中文 (中国) 中文 (中国)
    • Português Português
    • Italiano Italiano
    • Suomi Suomi
    • Svenska Svenska
    • Dansk Dansk
    • Slovenčina Slovenčina
    • Türkçe Türkçe
    • Nederlands Nederlands
    • Magyar Magyar
    • ไทย ไทย
    • हिन्दी हिन्दी
    • Ελληνικά Ελληνικά
    • Tiếng Việt Tiếng Việt
    • Lietuviškai Lietuviškai
    • Latviešu valoda Latviešu valoda
    • Eesti Eesti
    • Čeština Čeština
    • Română Română
    • Norsk Bokmål Norsk Bokmål
  • Creating 3D Character Using 3DCoat
Expand All Collapse All
  • Introduction to 3DCoat
  • Getting started
    • System requirements
    • Activating 3DCoat
    • Startup error
      • Startup error Mac
    • Upgrading permanent license
    • Linux Setup
      • Linux initial setup per-user installation
      • Linux initial setup for system
      • Tablet setup
      • To GTK3 from GTK2
    • Folders Structure
      • Custom documents folder
    • Different Forms of “Resolution”
    • Import and Export
    • Applinks in 3DCoat
      • Blender 4.1 applink
        • Blender with the Applink in Linux
      • Blender 4.2/3 applink
      • Max Applink
      • Houdini applink
      • Lightwave uplink
  • Navigation
    • Opening Dialog (Quick Start Menu)
    • Navigation Panel
    • Camera and Navigation
      • Customize Navigation as Blender
    • Viewport Navigation Gizmo
    • Left tool panel
    •  Activity Bar
    • Navigation using 3DConnexion devices
      • How to compile Spacenavd on non Ubuntu distro
    • Stylus doesn’t work in sculpting
    • Hotkeys
  • Interface
    • File
    • Edit
      • Calculate Curvature
      • Calculate Occlusion
      • Light Baking Tool
      • Preferences
    • View
    • Symmetry
    • Textures
    • Calculate
    • Layers
    • Freeze
    • Hide
    • Bake
    • Curves
      • Curves editor
      • Fill with mesh layer
      • Scale of imported curves
    • Windows
      • Tabbed and Popup Panels
      • Controls
    • Scripts
    • Addons
    • Capture
    • Help
    • Room Customization
    • Modify or Create new Room
  • Brush Components
    • Brushes general use
      • Create alpha brushes and decals
      • Making alpha from current sculpt
      • Create a Brush from a 3D Object
      • Create brushes based on Curves
      • Load photoshop .abr brushes
    • Strokes
      • Curves Popup Menu
    • Brush Options panel
    • Brush Top Bar
    • Conditions Limiter
    • Strips Panel
    • Stencils Panel
    • Smart Materials
      • Add new images or materials
      • Attach a Smart material to a layer
      • Import Quixel Material
    • Presets for Brush alphas
  • Workspaces Rooms
    • Paint
      • Texture Painting & Modes
        • Per Pixel Painting
        • Displacement Painting (Micro-Vertex)
        • Ptex Painting
        • Surface Painting (Vertex painting)
      • Importing Into the Painting Room
        • Initial CC subdivision
        • UV Set smoothing
        • Sharp (hard) edge
        • Lock Normals
        • Load new UV layout After Model Changes
        • DAZ Genesis models into 3DCoat
      • Paint Menus
        • Edit menu
        • Textures Menu
          • Texture Baking Tools
        • Hide
        • Bake Paint menu
        • The Color Picker
      • Top Bar for the Painting
      • The Layers Panel
        • The Blending Panel
        • Layer and Clipping Masks
      • Left Tool Panel
      • Opacity & Transparency
      • Tweak tools
        • Tweak Toolset
        • Exporting from the Tweak Room
      • Stencil & Material preview panel
      • Exporting from the Painting Room
    • UV
      • UV Top Bar
      • UV Left tool panel
      • UV Preview Panel
      • UV workflow example
      • Importing Into the UV Room
      • Exporting from the UV Room
    • Retopology
      • Importing into Retopo Room
      • Retopo Mesh Menu
        • Virtual Mirror Mode
      • Bake menu
        • Autopo Baking guide
        • Baking guide
      • Top Bar
        • Select geometry
      • Left tool panel
        • Overall Purpose & Function
        • Add Geometry in the retopology room
          • Strokes tool in Retopology
        • Tweak Tools
        • UV Tools
        • Commands for Retopology room
      • AUTORETOPO
        • Autoretopology Guide
      • Poly Groups
    • Sculpt
      • Sculpt Layer
      • Sculpt Tree
      • Sculpt Brush options
      • Brush engine
      • Geometry menu
      • Right mouse button menu
      • Right-Click Menu
      • Shader
      • Voxel mode
        • Pure Voxel Sculpting
        • Density and Resolution
        • Clay Engine
        • Voxel Tools
        • Surface tools on Voxels
        • Voxel Adjustment Tools
        • Volumetric Painting
        • Voxel Objects Tools
      • Surface mode
        • Surface tools
        • Surface custom tools
        • Surface adjust tools
        • Surface Painting
        • Surface Objects Tools
        • Multi Level Resolution
          • Multires tools
          • Multires adjust
          • Multires commands
      • Sculpt curves
        • Spline Curves
        • Splines model creation
      • Vector Displacement
      • Transform tools
        • Transform
        • Instancer
        • Move
        • Pose
        • Fit
        • Reproject
      • Primitives
      • Live Booleans
      • Commands for Sculpt room
      • Import to Sculpt Room
      • Exporting from the Sculpt Room
    • Render
      • Comparison of different roughness values
      • Render Panel Functions
      • Turntable
      • Fakebake the lighting -non PBR-
    • Factures
      • Workflow
    • Simplest
    • Modeling
      • Mesh Menu
      • Left tool panel
        • Add Geometry
        • Tweak
        • UV panel
        • Commands panel
        • Selected
        • Entire Mesh
      • Loft surface example by Fluffy
      • Blockout by Poeboi
      • Import Zbrush Polygroups for UV mapping
    • Kitbash
    • 3DPrint
    • Photogrammetry
      • How to install Reality Capture
      • Reality Capture doesn’t show up ?
    • Nurbs
    • Nodes
      • Sculpt shader Nodes Library
  • Scripting & Core API
    • Scripting
    • Core API
    • Python API
  • Free 3DCoatPrint

Scripting & Core API

1155 views 0

Written by Carlos
September 23, 2022

Programming is the process of creating a set of instructions that tell a computer how to perform a task.
You can manage 3DСoat features with the 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 Menu → Create your Script or Create a new Core API script.

Scripts Menu

– Scripting is a series of commands that can be executed without compiling.
When we select a tool or execute a function, we execute 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 the full speed of compiled C++.
It is a powerful method to extend the 3DCoat’s functionality. You may automate the job or add principally new tools.

– Python API is very similar to the C++ Core API, but has its own advantages and drawbacks.

Scripting


3DCoat Scripting manual

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

That command can be known by recording it in memory by pressing over the function RMB+MMB simultaneously. 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 the script via the file menu “Scripts / Run Script”.

Core API


Core API manual introduction

The Core API is a 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 the full speed of compiled C++.

Core API script is a compliable C++17 program that 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.

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

* Core API supports colored voxels as well.

Python API


Python API manual introduction

The 3DCoat Python API is intended to trigger UI commands, operate over the scene, and create new tools. It is very similar to the C++ Core API, but has its own advantages and drawbacks.

  • No need for any additional setup to make your scripts; Python is embedded into the 3DCoat distributive.
  • Python is like a Swiss-knife, allowing you to bring the whole power of Python libraries into 3DCoat.
  • Python is much slower than C++, so it may be used only for general management, not for deep and complex algorithms.
  • If you are already familiar with the C++ Core API, the Python API is very similar, almost 1:1, with the same logic and function names.

How to begin?


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

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

Read all the commands in this document.

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 at the Examples is the best way to understand the API.

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

Was this helpful?

Yes  No
Related Articles
  • Reproject
  • Fit
  • Pose
  • Move
  • Instancer
  • 3DPrint
Previously
Sculpt shader Nodes Library
Up Next
Scripting
AI:
Hi! How can I help you?
Attention: This is a beta version of AI chat. Some answers may be wrong. See full version of AI chat