|
Nebula
|
#include <materialdocument.h>
A material open in the asset editor: its textures and values, edited on the material the scene uses, so a change shows in the level as it is made, and on a knob in the asset preview.
Every change is a command in the document's undo history. A value is shown while it is dragged and becomes a command when the drag ends. A texture is picked, dropped or pasted into its slot.
Saving writes the work file, the template name with a value per parameter, textures by their URN. Only the template's parameters are written, along with what the work file had that the template does not know, which is kept as it was. The template is shown but not changed here: a loaded material cannot take another template, so that needs the material made again.