Skip to content

Commit

Permalink
Merge branch 'RB-2.0'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Engine/Settings.cpp
#	Engine/Settings.h
  • Loading branch information
devernay committed May 23, 2016
2 parents eba18ef + e004a34 commit 782f48d
Show file tree
Hide file tree
Showing 11 changed files with 218 additions and 147 deletions.
4 changes: 4 additions & 0 deletions Engine/FrameEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@

#include <list>
#include <string>

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
#include <boost/shared_ptr.hpp>
#endif

CLANG_DIAG_OFF(deprecated)
#include <QtCore/QObject>
#include <QtCore/QMutex>
CLANG_DIAG_ON(deprecated)

#include "Global/GlobalDefines.h"
#include "Engine/FrameKey.h"
Expand Down
147 changes: 86 additions & 61 deletions Engine/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,14 +1080,24 @@ Settings::initializeKnobsViewers()
_autoProxyLevel->populateChoices(autoProxyChoices);
_viewersTab->addKnob(_autoProxyLevel);


_maximumNodeViewerUIOpened = AppManager::createKnob<KnobInt>( this, tr("Max. opened node viewer interface") );
_maximumNodeViewerUIOpened->setName("maxNodeUiOpened");
_maximumNodeViewerUIOpened->setMinimum(1);
_maximumNodeViewerUIOpened->setAnimationEnabled(false);
_maximumNodeViewerUIOpened->disableSlider();
_maximumNodeViewerUIOpened->setHintToolTip( tr("Controls the maximum amount of nodes that can have their interface showing up at the same time in the viewer") );
_viewersTab->addKnob(_maximumNodeViewerUIOpened);

_viewerKeys = AppManager::createKnob<KnobBool>( this, tr("Use number keys for the viewer") );
_viewerKeys->setName("viewerNumberKeys");
_viewerKeys->setAnimationEnabled(false);
_viewerKeys->setHintToolTip( tr("When enabled, the row of number keys on the keyboard "
"is used for switching input (<key> connects input to A side, "
"<shift-key> connects input to B side), even if the corresponding "
"character in the current keyboard layout is not a number.\n"
"This may have to be disabled when using a remote display connection "
"to Linux from a different OS.") );
_viewersTab->addKnob(_viewerKeys);
} // Settings::initializeKnobsViewers

void
Expand Down Expand Up @@ -1499,6 +1509,7 @@ Settings::setDefaultValues()
_autoProxyWhenScrubbingTimeline->setDefaultValue(true);
_autoProxyLevel->setDefaultValue(1);
_maximumNodeViewerUIOpened->setDefaultValue(2);
_viewerKeys->setDefaultValue(true);

_warnOcioConfigKnobChanged->setDefaultValue(true);
_ocioStartupCheck->setDefaultValue(true);
Expand Down Expand Up @@ -2190,6 +2201,9 @@ Settings::onKnobValueChanged(KnobI* k,
return ret;
} // onKnobValueChanged

////////////////////////////////////////////////////////
// "Viewers" pane

ImageBitDepthEnum
Settings::getViewersBitDepth() const
{
Expand All @@ -2210,6 +2224,75 @@ Settings::getViewerTilesPowerOf2() const
return _powerOf2Tiling->getValue();
}

int
Settings::getCheckerboardTileSize() const
{
return _checkerboardTileSize->getValue();
}

void
Settings::getCheckerboardColor1(double* r,
double* g,
double* b,
double* a) const
{
*r = _checkerboardColor1->getValue(0);
*g = _checkerboardColor1->getValue(1);
*b = _checkerboardColor1->getValue(2);
*a = _checkerboardColor1->getValue(3);
}

void
Settings::getCheckerboardColor2(double* r,
double* g,
double* b,
double* a) const
{
*r = _checkerboardColor2->getValue(0);
*g = _checkerboardColor2->getValue(1);
*b = _checkerboardColor2->getValue(2);
*a = _checkerboardColor2->getValue(3);
}

bool
Settings::isAutoWipeEnabled() const
{
return _autoWipe->getValue();
}

bool
Settings::isAutoProxyEnabled() const
{
return _autoProxyWhenScrubbingTimeline->getValue();
}

unsigned int
Settings::getAutoProxyMipMapLevel() const
{
return (unsigned int)_autoProxyLevel->getValue() + 1;
}

int
Settings::getMaxOpenedNodesViewerContext() const
{
return _maximumNodeViewerUIOpened->getValue();
}

bool
Settings::isViewerKeysEnabled() const
{
return _viewerKeys->getValue();
}

///////////////////////////////////////////////////////
// "Caching" pane

bool
Settings::isAggressiveCachingEnabled() const
{
return _aggressiveCaching->getValue();
}

double
Settings::getRamMaximumPercent() const
{
Expand All @@ -2234,6 +2317,8 @@ Settings::getMaximumDiskCacheNodeSize() const
return (U64)( _maxDiskCacheNodeGB->getValue() ) * std::pow(1024., 3.);
}

///////////////////////////////////////////////////

double
Settings::getUnreachableRamPercent() const
{
Expand Down Expand Up @@ -3144,36 +3229,6 @@ Settings::isAutoFixRelativeFilePathEnabled() const
return _fixPathsOnProjectPathChanged->getValue();
}

int
Settings::getCheckerboardTileSize() const
{
return _checkerboardTileSize->getValue();
}

void
Settings::getCheckerboardColor1(double* r,
double* g,
double* b,
double* a) const
{
*r = _checkerboardColor1->getValue(0);
*g = _checkerboardColor1->getValue(1);
*b = _checkerboardColor1->getValue(2);
*a = _checkerboardColor1->getValue(3);
}

void
Settings::getCheckerboardColor2(double* r,
double* g,
double* b,
double* a) const
{
*r = _checkerboardColor2->getValue(0);
*g = _checkerboardColor2->getValue(1);
*b = _checkerboardColor2->getValue(2);
*a = _checkerboardColor2->getValue(3);
}

int
Settings::getNumberOfParallelRenders() const
{
Expand Down Expand Up @@ -3290,12 +3345,6 @@ Settings::notifyOnFileChange() const
return _notifyOnFileChange->getValue();
}

bool
Settings::isAggressiveCachingEnabled() const
{
return _aggressiveCaching->getValue();
}

bool
Settings::isAutoTurboEnabled() const
{
Expand Down Expand Up @@ -3753,24 +3802,6 @@ Settings::getDopeSheetEditorNodeSeparationWith() const
return 4;
}

int
Settings::getMaxOpenedNodesViewerContext() const
{
return _maximumNodeViewerUIOpened->getValue();
}

bool
Settings::isAutoProxyEnabled() const
{
return _autoProxyWhenScrubbingTimeline->getValue();
}

unsigned int
Settings::getAutoProxyMipMapLevel() const
{
return (unsigned int)_autoProxyLevel->getValue() + 1;
}

bool
Settings::isNaNHandlingEnabled() const
{
Expand Down Expand Up @@ -3826,12 +3857,6 @@ Settings::getUserStyleSheetFilePath() const
return _qssFile->getValue();
}

bool
Settings::isAutoWipeEnabled() const
{
return _autoWipe->getValue();
}

void
Settings::setRenderQueuingEnabled(bool enabled)
{
Expand Down
27 changes: 15 additions & 12 deletions Engine/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON
ViewSpec view,
bool originatedFromMainThread) OVERRIDE FINAL;

ImageBitDepthEnum getViewersBitDepth() const;

int getViewerTilesPowerOf2() const;

double getRamMaximumPercent() const;

double getRamPlaybackMaximumPercent() const;
Expand Down Expand Up @@ -241,11 +237,19 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON

bool isAutoFixRelativeFilePathEnabled() const;

bool isAutoWipeEnabled() const;

///////////////////////////////////////////////////////
// "Viewers" pane
ImageBitDepthEnum getViewersBitDepth() const;
int getViewerTilesPowerOf2() const;
int getCheckerboardTileSize() const;
void getCheckerboardColor1(double* r, double* g, double* b, double* a) const;
void getCheckerboardColor2(double* r, double* g, double* b, double* a) const;
bool isAutoWipeEnabled() const;
bool isAutoProxyEnabled() const;
unsigned int getAutoProxyMipMapLevel() const;
int getMaxOpenedNodesViewerContext() const;
bool isViewerKeysEnabled() const;
///////////////////////////////////////////////////////

bool areRGBPixelComponentsSupported() const;

Expand Down Expand Up @@ -347,15 +351,9 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON
int getSEFontSize() const;
std::string getSEFontFamily() const;


void getPluginIconFrameColor(int *r, int *g, int *b) const;
int getDopeSheetEditorNodeSeparationWith() const;

bool isAutoProxyEnabled() const;
unsigned int getAutoProxyMipMapLevel() const;

int getMaxOpenedNodesViewerContext() const;

bool isNaNHandlingEnabled() const;

bool isCopyInputImageForPluginRenderEnabled() const;
Expand Down Expand Up @@ -473,6 +471,8 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON
boost::shared_ptr<KnobInt> _maxDiskCacheNodeGB;
boost::shared_ptr<KnobPath> _diskCachePath;
boost::shared_ptr<KnobButton> _wipeDiskCache;

// "Viewers" pane
boost::shared_ptr<KnobPage> _viewersTab;
boost::shared_ptr<KnobChoice> _texturesMode;
boost::shared_ptr<KnobInt> _powerOf2Tiling;
Expand All @@ -483,6 +483,9 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON
boost::shared_ptr<KnobBool> _autoProxyWhenScrubbingTimeline;
boost::shared_ptr<KnobChoice> _autoProxyLevel;
boost::shared_ptr<KnobInt> _maximumNodeViewerUIOpened;
boost::shared_ptr<KnobBool> _viewerKeys;

// "Nodegraph" pane
boost::shared_ptr<KnobPage> _nodegraphTab;
boost::shared_ptr<KnobBool> _autoTurbo;
boost::shared_ptr<KnobBool> _useNodeGraphHints;
Expand Down
5 changes: 3 additions & 2 deletions Gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,12 @@ Gui::createMenuActions()
_imp->actionConnectInput[i] = new ActionWithShortcut(kShortcutGroupGlobal, ids[i], descs[i], this);
_imp->actionConnectInput[i]->setData( i % (NATRON_CONNECT_INPUT_NB / 2) );
_imp->actionConnectInput[i]->setShortcutContext(Qt::WidgetShortcut);
if (i < NATRON_CONNECT_INPUT_NB/2) {
if (i < NATRON_CONNECT_INPUT_NB / 2) {
QObject::connect( _imp->actionConnectInput[i], SIGNAL(triggered()), this, SLOT(connectInput()) );
} else {
QObject::connect( _imp->actionConnectInput[i], SIGNAL(triggered()), this, SLOT(connectBInput()) );
} }
}
}

_imp->actionImportLayout = new ActionWithShortcut(kShortcutGroupGlobal, kShortcutIDActionImportLayout, kShortcutDescActionImportLayout, this);
QObject::connect( _imp->actionImportLayout, SIGNAL(triggered()), this, SLOT(importLayout()) );
Expand Down
1 change: 1 addition & 0 deletions Gui/Gui30.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ Gui::connectBInput(int inputNb)
{
#pragma message WARN("TODO: Gui::connectBInput()")
qDebug() << "Gui::connectBInput" << inputNb;

return connectInput(inputNb);
}

Expand Down
Loading

0 comments on commit 782f48d

Please sign in to comment.