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