# UDM Editor

The UDM editor can be used to make changes to UDM-based data, which includes most of Pragma's asset formats and the PFM project file format.

To use it, select `Windows > UDM Editor` from the menu bar, then click the [![create_actor_button.png](https://wiki.pragma-engine.com/uploads/images/gallery/2022-07/scaled-1680-/pragma-2022-07-17-12-59-15.png)](https://wiki.pragma-engine.com/uploads/images/gallery/2022-07/pragma-2022-07-17-12-59-15.png)-icon and choose `Open`. Now select the file you wish to edit (e.g. the model or material). If the file is a valid UDM file, the UI should get populated with the UDM data, which you can now edit.

<p class="callout info">Make sure to press `Save` when you're done, to ensure your changes aren't lost!</p>

UDM data is represented as a simple tree-structure with key-value pairs. The key is always a name (`string`) and is displayed in the `Tree` column. Every key has a corresponding value, which can be an `element`, `array` or concrete data `value` and is displayed in the `Data` column:

[![udm_editor_keyvalue.png](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/scaled-1680-/pragma-2022-10-31-18-27-54.png)](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/pragma-2022-10-31-18-27-54.png)

In the example above the key `mass` has the value `1.0` (float) assigned to it. You can double-click a `value` to change it.

An `element` represents a node in the tree and can have children, which also can have children, etc. You can expand or collapse the children of an `element` by clicking the +/- icon next to it:

[![udm_editor_elements.png](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/scaled-1680-/pragma-2022-10-31-18-38-10.png)](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/pragma-2022-10-31-18-38-10.png)

An `array` is simply a list of concrete `values` (e.g. an array of `vec3`) or `elements`.

You can remove properties by right-clicking them and choosing `Remove`. To add a new property, right-click an element and choose `Add Property`, then select the type of the value. You can also select `element` to create a child-element, or `Add Array` to create an `array` of values/elements. After making your selection, you will have to enter a key-name and press enter.

If the tree is too large to work with effectively, you can right-click an `element` and choose `Make Root`, which will re-arrange the tree view to only display that `element` and its children. You can press the [![home_icon.png](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/scaled-1680-/pragma-2022-10-31-18-46-57.png)](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/pragma-2022-10-31-18-46-57.png)-icon to get back to the original root.

<p class="callout warning">If you are editing an asset file (like a model), the changes may not actually apply until Pragma has been reloaded. For editing materials, it is usually better to use the [material editor](https://wiki.pragma-engine.com/books/pragma-filmmaker/page/material-editor).</p>

You can also use the UDM editor to edit properties of a PFM project which may not be accessible otherwise (handle with care!):

[![udm_editor_pfm_project.png](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/scaled-1680-/pragma-2022-10-31-18-55-28.png)](https://wiki.pragma-engine.com/uploads/images/gallery/2022-10/pragma-2022-10-31-18-55-28.png)