Radium Engine
1.5.20
|
Simple Widget for Material/RenderParameter editing A material editor will show information about the selected material and expose a control panel containing all of its editable parameters to allow the user to edit them. More...
#include <Gui/ParameterSetEditor/MaterialParameterEditor.hpp>
Signals | |
void | materialParametersModified (const std::string &name) |
Public Member Functions | |
void | setupFromParameters (Engine::Data::RenderParameters ¶ms, const nlohmann::json &constraints, const std::string &name="") |
Update the different UI element with the given renderParameter, using the given constraints. | |
void | setupFromMaterial (std::shared_ptr< Ra::Engine::Data::Material > material) |
void | showUnspecified (bool enable) |
MaterialParameterEditor (QWidget *parent=nullptr) | |
MaterialParameterEditor (const MaterialParameterEditor &)=delete | |
MaterialParameterEditor & | operator= (const MaterialParameterEditor &)=delete |
MaterialParameterEditor (MaterialParameterEditor &&)=delete | |
MaterialParameterEditor && | operator= (MaterialParameterEditor &&)=delete |
Simple Widget for Material/RenderParameter editing A material editor will show information about the selected material and expose a control panel containing all of its editable parameters to allow the user to edit them.
Definition at line 29 of file MaterialParameterEditor.hpp.
|
explicit |
Constructors and destructor
Definition at line 20 of file MaterialParameterEditor.cpp.
|
signal |
Signal emitted whenever a parameter is modified
void Ra::Gui::MaterialParameterEditor::setupFromMaterial | ( | std::shared_ptr< Ra::Engine::Data::Material > | material | ) |
Update the different UI element with the given material. This helper function calls setupFromParameters with the given material parameter set and constraints but also displays the properties of the material and populate the widget with widgets to edit its editable parameters.
material | The pointer to the material to edit |
Definition at line 57 of file MaterialParameterEditor.cpp.
void Ra::Gui::MaterialParameterEditor::setupFromParameters | ( | Engine::Data::RenderParameters & | params, |
const nlohmann::json & | constraints, | ||
const std::string & | name = "" ) |
Update the different UI element with the given renderParameter, using the given constraints.
params | the parameter set to edit |
constraints | the parameter constraints descriptor |
name | (optional) the name to display in top of the editor |
void Ra::Gui::MaterialParameterEditor::showUnspecified | ( | bool | enable | ) |
Wether to show parameters without associated metadata
enable |
Definition at line 91 of file MaterialParameterEditor.cpp.