Introduction to Python Scripting
Getting started with RapidPipeline Python Scripting
RapidPipeline's Python scripting API is a powerful way to automate repeating tasks, and to access many advanced functionalities through a programmatic interface. This is also useful in case you prefer to work with coding agents / AI, but in general for everyone looking to customize workflows and save time when working with 3D assets through RapidPipeline.
Using the API
When a script runs inside RPTS (RapidPipeline Twin Studio), a few names are already available without any import: rpts (the RPTS scripting module, with helpers for selection, visibility, materials and more), rpd (the RapidPipeline data module, with the scene classes such as Node, Mesh and Material), and get_asset() (returns the currently loaded asset, or None if nothing is loaded). import rpts and import rpd are harmless if you prefer to be explicit about where these names come from, and rpts.get_asset() is the same call as get_asset().
What's in this section
- Basics and Filtering - reading the scene hierarchy, walking nodes, and filtering them by name or metadata.
- Selection and Visibility - selecting, hiding, showing and deleting nodes.
- Working with Materials - listing library and scene materials, assigning them to nodes, round-tripping assignments through CSV, and exporting edited materials as a new library.
- Processing and Reimporting - running processing actions, scoping them to a selection, and reimporting a CAD asset with a JSON import config.
- Rendering Images - listing renderers and quality presets, and rendering the whole asset, a single node, each mesh, or a turntable sequence to PNG files.