Basic Structures in a Scene
Core object types and scene structures used in Asset Transformer Studio Python scripting
Read time 2 minutesLast updated a day ago
To get started, check also the following topics about concepts and vocabulary:
Object types
- All objects are called
entities - In Python scripting, an entity is defined by a unique numerical identifier, or
ID - The API Reference shows inheritance of entity types.
For example, a part is inherited from component, so if a function wants a parameter you can give it a :
componentpart
Scene occurrences
- Product Structure / Scene nodes are Occurrences
- An occurrence can have child occurrences
- An occurrence has Properties:
- Name
- Transform
- Material
- Visible
- An occurrence owns components (maximum one of each type)

Scene components
List of component types:
- Part
- PMI
- Light
- Metadata
- Variant
- Animation
- Joint
- SubPart Material
Prototyping
- Each occurrence can have a prototype, a prototype is also an occurrence
- A prototype is a kind of pattern
- An occurrence can override properties of its prototype occurrence

See also: About Instances & Prototypes
Scene Part
- A part contains geometry, contained in a shape
- A part may contain one or two shapes:
- A with CAD representation
BRep Shape - A with Mesh representation
Tessellated Shape
- A
- The active shape is the tessellated shape if it exists, the BRep shape otherwise.
- A part has a local transformation matrix

Common functions for scene handling
Get the type of an entity as a String:
core.getEntityTypeString(entity)
Get/Set a property value (all property values are Strings):
nameValue = core.getProperty(entity, "Name") core.setProperty(entity, "Name", "NameValue")
List available properties on an entity:
core.listProperties(entity)
Other Python examples
Occurrence list with the root:
[scene.getRoot()]
Occurrence list with all parts:
scene.getPartOccurrences()
Occurrence list with selection:
scene.getSelectedOccurrences()
All occurrences:
scene.findOccurrencesByProperty('Name', '.*')