MaterialRecordEditor
The editor of a material definition record: its header, its parameters, its patterns and its channels (rendering-revamp §RVM-9).
| Inherits | QWidget |
In the namespace construct::ui. Declared in src/libs/libconstruct/construct/ui/MaterialRecordEditor.hpp.
Detailed description
The editor is a channel list (R18). It edits the record's text through model::MaterialDefinition::setValue() and remove(), so the comments and the key order of the record stay as the author wrote them, and it holds nothing that the record does not. Each edit emits definitionEdited(); the window saves the record on Save.
The four sections:
- Header: the name, the family and the summary. The window puts the preview beside them.
- Parameters: one row per exposed knob, with its name, type, default and range, and an add and a remove.
- Patterns: one row per named pattern, with its field record (chosen in the definition picker, filtered to the
fieldfamily), its space, scale, offset and the field's own parameters. - Channels: one row per channel, grouped by OpenPBR layer. A layer that the record does not use is folded. Each row has its source kind (a SegmentedControl) and the editor of that kind.
A value edit (a number, a color, a text) writes at once and keeps the rows. An edit of the structure (a kind, a name, a row added or removed) builds the rows again on the next event-loop turn, so a widget is never deleted in its own signal.