The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit bdcedc2b authored by Jakob Weiss's avatar Jakob Weiss
Browse files

Use of ColorProperty's, metaprop has better styling

parent ce6e4a7e
......@@ -39,6 +39,7 @@ namespace campvis {
//connect(_colorPicker, SIGNAL(valueChanged(cgt::vec4)), this, SLOT(onColorChanged(cgt::vec4)));
connect(_colorPicker, SIGNAL(colorChanged(const QColor&)), this, SLOT(onColorChanged(const QColor&)));
updateWidgetFromProperty();
}
ColorPropertyWidget::~ColorPropertyWidget() {
......
......@@ -28,17 +28,22 @@
#include <QGroupBox>
namespace campvis {
MetaPropertyWidget::MetaPropertyWidget(MetaProperty* property, DataContainer* dc, QWidget* parent /*= 0*/)
: AbstractPropertyWidget(property, true, dc, parent, true)
, _pcw(0)
{
//cgtAssert(_dataContainer != 0, "Pointer to DataContainer must not be 0.");
MetaPropertyWidget::MetaPropertyWidget(MetaProperty* property, DataContainer* dc, QWidget* parent /*= 0*/)
: AbstractPropertyWidget(property, true, dc, parent, true)
, _pcw(0)
{
//cgtAssert(_dataContainer != 0, "Pointer to DataContainer must not be 0.");
_pcw = new PropertyCollectionWidget(this);
_pcw->updatePropCollection(property, _dataContainer);
addWidget(_pcw);
_pcw = new PropertyCollectionWidget(this);
_pcw->updatePropCollection(property, _dataContainer);
addWidget(_pcw);
updateWidgetFromProperty();
updateWidgetFromProperty();
_groupBox->parentWidget()->setStyleSheet(
"QGroupBox::indicator:checked { image: url(:/qt-project.org/styles/commonstyle/images/down-32.png); }\n"
"QGroupBox::indicator:unchecked { image: url(:/qt-project.org/styles/commonstyle/images/right-32.png);}"
);
}
MetaPropertyWidget::~MetaPropertyWidget() {
......
......@@ -28,6 +28,7 @@
#include "core/pipeline/abstractprocessordecorator.h"
#include "core/properties/floatingpointproperty.h"
#include "core/properties/datanameproperty.h"
#include "core/properties/colorproperty.h"
namespace cgt {
class TextureUnit;
......@@ -47,8 +48,8 @@ namespace campvis {
virtual void renderEpilog(cgt::Shader* shader) override;
Vec4Property _backgroundColor1;
Vec4Property _backgroundColor2;
ColorProperty _backgroundColor1;
ColorProperty _backgroundColor2;
DataNameProperty _backgroundTexture;
std::shared_ptr<cgt::TextureUnit> _bgTexUnit;
......
......@@ -32,9 +32,9 @@ namespace campvis {
: AbstractProcessor()
, p_lightId("LightId", "Light Name/ID", "lightsource", DataNameProperty::WRITE)
, p_lightPosition("LightPosition", "Light Position", cgt::vec3(-100.f), cgt::vec3(-500.f), cgt::vec3(500.f), cgt::vec3(1.f))
, p_ambientColor("AmbientColor", "Ambient Light Color", cgt::vec3(0.4f), cgt::vec3(0.f), cgt::vec3(1.f))
, p_diffuseColor("DiffuseColor", "Diffuse Light Color", cgt::vec3(0.75f), cgt::vec3(0.f), cgt::vec3(1.f))
, p_specularColor("SpecularColor", "Specular Light Color", cgt::vec3(0.6f), cgt::vec3(0.f), cgt::vec3(1.f))
, p_ambientColor("AmbientColor", "Ambient Light Color", cgt::vec4(0.4f), cgt::vec4(0.f), cgt::vec4(1.f))
, p_diffuseColor("DiffuseColor", "Diffuse Light Color", cgt::vec4(0.75f), cgt::vec4(0.f), cgt::vec4(1.f))
, p_specularColor("SpecularColor", "Specular Light Color", cgt::vec4(0.6f), cgt::vec4(0.f), cgt::vec4(1.f))
, p_shininess("Shininess", "Specular Shininess", 24.f, 0.f, 64.f, 0.5f)
, p_attenuation("Attenuation", "Attenuation Factors", cgt::vec3(0.f), cgt::vec3(0.f), cgt::vec3(1.f))
{
......@@ -54,9 +54,9 @@ namespace campvis {
void LightSourceProvider::updateResult(DataContainer& data) {
LightSourceData* lsd = new LightSourceData(
p_lightPosition.getValue(),
p_ambientColor.getValue(),
p_diffuseColor.getValue(),
p_specularColor.getValue(),
p_ambientColor.getValue().xyz(),
p_diffuseColor.getValue().xyz(),
p_specularColor.getValue().xyz(),
p_shininess.getValue(),
p_attenuation.getValue());
data.addData(p_lightId.getValue(), lsd);
......
......@@ -30,6 +30,7 @@
#include "core/pipeline/abstractprocessor.h"
#include "core/properties/datanameproperty.h"
#include "core/properties/floatingpointproperty.h"
#include "core/properties/colorproperty.h"
#include "modules/modulesapi.h"
#include "core/pipeline/processorfactory.h"
......@@ -66,9 +67,9 @@ namespace campvis {
DataNameProperty p_lightId; ///< Name/ID for the LightSource to create
Vec3Property p_lightPosition; ///< Light position
Vec3Property p_ambientColor; ///< Ambient light color
Vec3Property p_diffuseColor; ///< Diffuse light color
Vec3Property p_specularColor; ///< Specular light color
ColorProperty p_ambientColor; ///< Ambient light color
ColorProperty p_diffuseColor; ///< Diffuse light color
ColorProperty p_specularColor; ///< Specular light color
FloatProperty p_shininess; ///< Specular shininess
Vec3Property p_attenuation; ///< Attenuation factors
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment