# Common object and property conventions

> Documentation version: 3.0
> HTML: https://docs.flarelive.manifolddynamics.com/reference/common/properties.html
> [Complete contents](https://docs.flarelive.manifolddynamics.com/contents.md) · [Agent index](https://docs.flarelive.manifolddynamics.com/llms.txt)

Select an object in Hierarchy, World or Presets to edit it in Inspector. Reference pages list the case-sensitive **API path** alongside each property's meaning and units. The GUI turns names such as `offset_on_target` into **Offset on target**.

## Shared fields

| Field | Purpose |
| --- | --- |
| Name (`name`) | Display name. Names may repeat; use the hierarchy path to distinguish objects. |
| Enabled (`enabled`) | Turns the object's behavior on or off. A disabled scene parent also disables its children. |
| Visible (`Visible`) | Shows or hides the object and its descendants. Physics remains active when only visibility is off. |
| Position (`position`) | XYZ offset from the parent in meters, measured in the parent's axes. |
| Rotation (`rotation`) | Euler rotation relative to the parent, stored in radians with matrix convention `Rx(x) × Ry(y) × Rz(z)`. |

Enable and visibility switches store each object's own value. A greyed switch in Hierarchy means a parent overrides that value. To hide an object while keeping its physics, change **Visible** and leave **Enabled** on.

“Editable in Simulation” means editable after initialization, including while paused. Stop Simulation to change a preparation-only property. In an Experiment before initialization, preparation edits are allowed and discarded when the Experiment ends.

## Numbers, vectors, colors and paths

Inspector provides numeric inputs, one-row XYZ inputs, a color picker and file/folder selectors. Confirm text with Enter or click another control to commit it. Undo reverses an edit; a continuous color-picker drag produces one history entry in Document.

For Python, set a scalar leaf. For example, given a Camera handle named `camera`:

```python
with ws.transaction("Move camera"):
    ws.set_property(camera, "position.x", 4.0)
    ws.set_property(camera, "position.y", -3.0)
    ws.set_property(camera, "position.z", 2.0)
```

Vector3 children are `x`, `y`, `z`. Color children are `r`, `g`, `b` and each channel is clamped to 0–1. Use `get_property(camera, "position.x")` to read a component. Semantic metadata identifies the component layout and how Inspector displays it.

Path properties hold an absolute path or an empty string. Create the output directory and set World's **Working directory** before running a scripted trial. Export and cache subdirectory names are ordinary strings relative to that directory.

## Enum choices and flags

GUI dropdowns display labels. Python reads and writes their integer values; `enum_options` maps those values to the same labels.

For an existing Position Tracker handle named `tracker`:

```python
metadata = ws.property_metadata(tracker, "constraint")
choices = dict(metadata.enum_options)
current = ws.get_property(tracker, "constraint")
print(current, choices[current])  # e.g. 0 Free
plane = next(value for value, label in metadata.enum_options if label == "Plane")
ws.set_property(tracker, "constraint", plane)
```

Flags allow several choices at once. For a mesh shape handle named `shape`, this prints its enabled **Use as** labels:

```python
metadata = ws.property_metadata(shape, "use_as")
mask = ws.get_property(shape, "use_as")
labels = [label for bit, label in metadata.enum_options if bit and (mask & bit) == bit]
print(" | ".join(labels) if labels else "None")
```

Combine desired flag values with bitwise OR, then pass the integer to `set_property`.

## Object references

A reference dropdown selects a compatible object or **None**. In Python, a reference value is an `ObjectHandle` or `None`. Read details from that handle:

```python
mesh = ws.get_property(shape, "mesh")
if mesh is not None:
    details = ws.object_details(mesh)
    print(details.name, details.class_info.canonical_name)
```

Use `describe_reference(shape, "mesh")` to find compatible candidates before assigning one. Candidate lists also report whether the property is currently editable. See [inspection queries](https://docs.flarelive.manifolddynamics.com/reference/api/inspection.md) for a complete read-only example.

## Conditional fields and lists

**Show If** displays a field only when a related bool or enum has the required value. For example, selecting a wall model reveals its parameters. Hidden fields retain their values; Python property trees include them with visibility metadata.

Property metadata's `visible` describes whether a field is displayed in Inspector. The object's `Visible` property controls scene rendering; these are separate settings.

**Default collapsed** controls the initial presentation of a group, such as Advanced. Expand the group to see its fields.

List paths use numeric indices, for example `items.0`. Append an item before setting its fields. A schema path containing `*` describes the item layout; replace it with the actual index when accessing a value.

Defaults in a component table describe a newly created object. Configure its required references and physical parameters before initialization. Use the asset import actions to create mesh and image content; see [model import](https://docs.flarelive.manifolddynamics.com/manual/assets/models.md).
