Commit cf0c2d9d authored by Jan Möbius's avatar Jan Möbius

Fixed standard pipeline to use the basecolor now (emmisive)

Renamed the basecolor functions in the core to defaultColor

closes #1230

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15743 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 63856e25
......@@ -160,9 +160,9 @@ void Core::readApplicationOptions(INIFile& _ini) {
//============================================================================
// Load the random base color setting
//============================================================================
bool random_base_color = false;
if ( _ini.get_entry( random_base_color, "Options" , "RandomBaseColor") )
OpenFlipper::Options::randomBaseColor( random_base_color );
bool random_default_color = false;
if ( _ini.get_entry( random_default_color, "Options" , "RandomDefaultColor") )
OpenFlipper::Options::randomDefaultColor( random_default_color );
//============================================================================
// Load the synchronization setting
......@@ -217,9 +217,9 @@ void Core::readApplicationOptions(INIFile& _ini) {
//============================================================================
// Load the setting for the object color option
//============================================================================
uint baseColor = 0;
if ( _ini.get_entry( baseColor, "Options" , "DefaultBaseColor") )
OpenFlipper::Options::defaultBaseColor(QRgb(baseColor));
unsigned int defaultColor = 0;
if ( _ini.get_entry( defaultColor, "Options" , "DefaultColor") )
OpenFlipper::Options::defaultColor(QRgb(defaultColor));
//============================================================================
// Load the setting for the default Toolbox mode
......@@ -258,7 +258,7 @@ void Core::readApplicationOptions(INIFile& _ini) {
// ViewerProperties
//============================================================================
uint viewerCount = 0;
unsigned int viewerCount = 0;
if( _ini.get_entry(viewerCount, "Options", "ViewerCount") ){
}
......@@ -362,7 +362,7 @@ void Core::writeApplicationOptions(INIFile& _ini) {
QString current_texture_dir = OpenFlipper::Options::currentTextureDirStr().toUtf8();
_ini.add_entry("Options","CurrentTextureDir",current_texture_dir);
_ini.add_entry("Options","RandomBaseColor", OpenFlipper::Options::randomBaseColor() );
_ini.add_entry("Options","RandomDefaultColor", OpenFlipper::Options::randomDefaultColor() );
if ( OpenFlipper::Options::gui() ) {
......@@ -390,7 +390,7 @@ void Core::writeApplicationOptions(INIFile& _ini) {
}
_ini.add_entry("Options","DefaultBaseColor", (uint)OpenFlipper::Options::defaultBaseColor().rgba () );
_ini.add_entry("Options","DefaultColor", (uint)OpenFlipper::Options::defaultColor().rgba () );
_ini.add_entry("Options", "StereoMode",OpenFlipper::Options::stereoMode() );
......
......@@ -148,7 +148,7 @@ void BaseObjectData::initializeScenegraphNodes() {
QColor color;
if ( OpenFlipper::Options::randomBaseColor() ){
if ( OpenFlipper::Options::randomDefaultColor() ){
QColor bckgrnd = OpenFlipperSettings().value("Core/Gui/glViewer/defaultBackgroundColor").value<QColor>();
int diff;
......@@ -162,7 +162,7 @@ void BaseObjectData::initializeScenegraphNodes() {
} while (diff < 70000);
}
else{
color = OpenFlipper::Options::defaultBaseColor();
color = OpenFlipper::Options::defaultColor();
}
ACG::Vec4f colorV;
......
......@@ -166,10 +166,10 @@ static QString currentViewMode_ = "";
static QString title_ = "OpenFlipper v?";
/// default base color
static QColor defaultBaseColor_ = QColor("white");
static QColor defaultColor_ = QColor("white");
/// use random base color
static bool randomBaseColor_ = false;
static bool randomDefaultColor_ = false;
/// Scripting status
static bool scripting_ = false;
......@@ -607,20 +607,20 @@ void windowTitle( QString _titel ) {
title_ = _titel;
}
void defaultBaseColor( QColor _color ) {
defaultBaseColor_ = _color;
void defaultColor( QColor _color ) {
defaultColor_ = _color;
}
QColor defaultBaseColor() {
return defaultBaseColor_;
QColor defaultColor() {
return defaultColor_;
}
void randomBaseColor(bool _random) {
randomBaseColor_ = _random;
void randomDefaultColor(bool _random) {
randomDefaultColor_ = _random;
}
bool randomBaseColor() {
return randomBaseColor_;
bool randomDefaultColor() {
return randomDefaultColor_;
}
/// return last used dataType
......
......@@ -560,21 +560,21 @@ QString helpDirStr();
DLLEXPORT
void windowTitle( QString _titel );
/// Default base color
/// Default color for objects
DLLEXPORT
void defaultBaseColor( QColor _color );
void defaultColor( QColor _color );
/// Default base color
/// Default color for objects
DLLEXPORT
QColor defaultBaseColor();
QColor defaultColor();
/// use randomized base color
/// use randomized color as default for objects
DLLEXPORT
void randomBaseColor(bool _random);
void randomDefaultColor(bool _random);
/// use randomized base color
/// use randomized color as default for objects
DLLEXPORT
bool randomBaseColor();
bool randomDefaultColor();
/** @} */
......
......@@ -137,7 +137,7 @@ OptionsWidget::OptionsWidget(std::vector<PluginInfo>& _plugins, std::vector<KeyB
//colordialog
connect(backgroundButton, SIGNAL(clicked()), this, SLOT(getBackgroundColor()) );
connect(baseColorButton, SIGNAL(clicked()), this, SLOT(getBaseColor()) );
connect(defaultColorButton, SIGNAL(clicked()), this, SLOT(getDefaultColor()) );
// Clear settings and ini buttons
connect(clearSettingsButton, SIGNAL(clicked()), this, SLOT(slotClearSettings()));
......@@ -160,14 +160,14 @@ void OptionsWidget::getBackgroundColor(){
backgroundButton->setIcon( QIcon(color) );
}
void OptionsWidget::getBaseColor(){
QColor newColor = QColorDialog::getColor ( OpenFlipper::Options::defaultBaseColor() );
void OptionsWidget::getDefaultColor(){
QColor newColor = QColorDialog::getColor ( OpenFlipper::Options::defaultColor() );
OpenFlipper::Options::defaultBaseColor( newColor) ;
OpenFlipper::Options::defaultColor( newColor) ;
QPixmap color(16,16);
color.fill( OpenFlipper::Options::defaultBaseColor() );
baseColorButton->setIcon( QIcon(color) );
color.fill( OpenFlipper::Options::defaultColor() );
defaultColorButton->setIcon( QIcon(color) );
}
void OptionsWidget::viewerSettingsChanged(QListWidgetItem* /*_item*/){
......@@ -370,10 +370,10 @@ void OptionsWidget::showEvent ( QShowEvent * /*event*/ ) {
backgroundColor_ = OpenFlipperSettings().value("Core/Gui/glViewer/defaultBackgroundColor").value<QColor>();
backgroundButton->setIcon( QIcon(color) );
color.fill( OpenFlipper::Options::defaultBaseColor() );
baseColorButton->setIcon( QIcon(color) );
color.fill( OpenFlipper::Options::defaultColor() );
defaultColorButton->setIcon( QIcon(color) );
randomBaseColor->setChecked( OpenFlipper::Options::randomBaseColor() );
randomDefaultColor->setChecked( OpenFlipper::Options::randomDefaultColor() );
viewerList->setCurrentRow(0);
......@@ -606,7 +606,7 @@ void OptionsWidget::slotApply() {
OpenFlipperSettings().setValue("Core/Gui/glViewer/restrictFrameRate", restrictFPS->isChecked());
OpenFlipperSettings().setValue("Core/Gui/glViewer/maxFrameRate", FPS->value() );
OpenFlipper::Options::randomBaseColor( randomBaseColor->isChecked() );
OpenFlipper::Options::randomDefaultColor( randomDefaultColor->isChecked() );
//stereo
if (stereoCustomAnaglyph->isChecked ())
......
......@@ -89,7 +89,7 @@ private slots:
/// open a dialog to determine the color
void getBackgroundColor();
void getBaseColor();
void getDefaultColor();
/// keyBinding TreeWidget-Item changed
void keyTreeItemChanged( QTreeWidgetItem* current, QTreeWidgetItem* previous );
......
......@@ -637,9 +637,9 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="baseColorButton">
<widget class="QPushButton" name="defaultColorButton">
<property name="text">
<string>Default base color</string>
<string>Default color</string>
</property>
</widget>
</item>
......@@ -659,9 +659,9 @@
</layout>
</item>
<item>
<widget class="QCheckBox" name="randomBaseColor">
<widget class="QCheckBox" name="randomDefaultColor">
<property name="text">
<string>Use random base color</string>
<string>Use random default color for objects</string>
</property>
</widget>
</item>
......
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