Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Gui::MaterialParameterEditor Class Reference

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>

+ Collaboration diagram for Ra::Gui::MaterialParameterEditor:

Signals

void materialParametersModified (const std::string &name)
 

Public Member Functions

void 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.
 
void setupFromMaterial (std::shared_ptr< Ra::Engine::Data::Material > material)
 
void showUnspecified (bool enable)
 
 MaterialParameterEditor (QWidget *parent=nullptr)
 
 MaterialParameterEditor (const MaterialParameterEditor &)=delete
 
MaterialParameterEditoroperator= (const MaterialParameterEditor &)=delete
 
 MaterialParameterEditor (MaterialParameterEditor &&)=delete
 
MaterialParameterEditor && operator= (MaterialParameterEditor &&)=delete
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MaterialParameterEditor()

Ra::Gui::MaterialParameterEditor::MaterialParameterEditor ( QWidget * parent = nullptr)
explicit

Constructors and destructor

Definition at line 20 of file MaterialParameterEditor.cpp.

Member Function Documentation

◆ materialParametersModified

void Ra::Gui::MaterialParameterEditor::materialParametersModified ( const std::string & name)
signal

Signal emitted whenever a parameter is modified

◆ setupFromMaterial()

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.

Parameters
materialThe pointer to the material to edit

Definition at line 57 of file MaterialParameterEditor.cpp.

+ Here is the call graph for this function:

◆ setupFromParameters()

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.

Parameters
paramsthe parameter set to edit
constraintsthe parameter constraints descriptor
name(optional) the name to display in top of the editor

◆ showUnspecified()

void Ra::Gui::MaterialParameterEditor::showUnspecified ( bool enable)

Wether to show parameters without associated metadata

Parameters
enable

Definition at line 91 of file MaterialParameterEditor.cpp.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: