From 5aef9c69d3ea78c950f89eff656ea59cffc33bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= Date: Mon, 23 May 2016 15:47:15 +0200 Subject: [PATCH 1/2] pyside config goes to config.pri --- INSTALL_LINUX.md | 4 ++++ global.pri | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/INSTALL_LINUX.md b/INSTALL_LINUX.md index 57890a30e4..fad1781240 100644 --- a/INSTALL_LINUX.md +++ b/INSTALL_LINUX.md @@ -129,6 +129,10 @@ LIBS is the path to the libs expat: LIBS += -lexpat expat: PKGCONFIG -= expat cairo: PKGCONFIG -= cairo + PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG --prefix)/lib/pkgconfig + pyside: PKGCONFIG += pyside + pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtCore + pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtGui EOF ----- end ----- diff --git a/global.pri b/global.pri index 8b6fd35d26..8102021bd5 100644 --- a/global.pri +++ b/global.pri @@ -319,12 +319,6 @@ unix { LIBS += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --libs pyside) } } - !macx { - PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG --prefix)/lib/pkgconfig - pyside: PKGCONFIG += pyside-py2 - pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside-py2)/QtCore - pyside: INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside-py2)/QtGui - } } #unix *-xcode { From e004a3454c08d92419fbec67d7c000f7652c3149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= Date: Mon, 23 May 2016 16:48:31 +0200 Subject: [PATCH 2/2] Viewer: add preference for number keys (may have to be disabled when running remotely on linux) --- Engine/Settings.cpp | 18 ++++++++++++++++++ Engine/Settings.h | 13 +++++++------ Gui/Gui50.cpp | 6 ++++-- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Engine/Settings.cpp b/Engine/Settings.cpp index 874977488a..a3690fe042 100644 --- a/Engine/Settings.cpp +++ b/Engine/Settings.cpp @@ -1059,6 +1059,17 @@ Settings::initializeKnobsViewers() "any graph containing such effect(s) will be slower to render on the viewer than when this option " "is unchecked.") ); _viewersTab->addKnob(_enableProgressReport); + + _viewerKeys = AppManager::createKnob( 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 ( connects input to A side, " + " 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 @@ -1462,6 +1473,7 @@ Settings::setDefaultValues() _autoProxyWhenScrubbingTimeline->setDefaultValue(true); _autoProxyLevel->setDefaultValue(1); _enableProgressReport->setDefaultValue(false); + _viewerKeys->setDefaultValue(true); _warnOcioConfigKnobChanged->setDefaultValue(true); _ocioStartupCheck->setDefaultValue(true); @@ -3642,6 +3654,12 @@ Settings::isInViewerProgressReportEnabled() const return _enableProgressReport->getValue(); } +bool +Settings::isViewerKeysEnabled() const +{ + return _viewerKeys->getValue(); +} + bool Settings::isDefaultAppearanceOutdated() const { diff --git a/Engine/Settings.h b/Engine/Settings.h index 8ba2454fae..90dc2c199e 100644 --- a/Engine/Settings.h +++ b/Engine/Settings.h @@ -240,11 +240,16 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON bool isAutoFixRelativeFilePathEnabled() const; - bool isAutoWipeEnabled() 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; + bool isInViewerProgressReportEnabled() const; + bool isViewerKeysEnabled() const; + bool areRGBPixelComponentsSupported() const; @@ -349,13 +354,8 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON void getPluginIconFrameColor(int *r, int *g, int *b) const; int getDopeSheetEditorNodeSeparationWith() const; - bool isAutoProxyEnabled() const; - unsigned int getAutoProxyMipMapLevel() const; - bool isNaNHandlingEnabled() const; - bool isInViewerProgressReportEnabled() const; - bool isDefaultAppearanceOutdated() const; void restoreDefaultAppearance(); @@ -470,6 +470,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON boost::shared_ptr _autoProxyWhenScrubbingTimeline; boost::shared_ptr _autoProxyLevel; boost::shared_ptr _enableProgressReport; + boost::shared_ptr _viewerKeys; boost::shared_ptr _nodegraphTab; boost::shared_ptr _autoTurbo; boost::shared_ptr _useNodeGraphHints; diff --git a/Gui/Gui50.cpp b/Gui/Gui50.cpp index 5987d57fa2..98278964d8 100644 --- a/Gui/Gui50.cpp +++ b/Gui/Gui50.cpp @@ -390,6 +390,10 @@ int Gui::handleNativeKeys(int key, quint32 nativeScanCode, quint32 nativeVirtualKey) { //qDebug() << "scancode=" << nativeScanCode << "virtualkey=" << nativeVirtualKey; + if (!appPTR->getCurrentSettings()->isViewerKeysEnabled()) { + return key; + } + #ifdef Q_WS_MAC // OS X virtual key codes, from // MacOSX10.11.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Events.h @@ -428,7 +432,6 @@ Gui::handleNativeKeys(int key, quint32 nativeScanCode, quint32 nativeVirtualKey) } #endif #ifdef Q_WS_WIN -#pragma message WARN("TODO: handle keys 0-9 on AZERTY keyboards") // https://msdn.microsoft.com/en-us/library/aa299374%28v=vs.60%29.aspx // 48 0x30 (VK_0) | 0 key // 49 0x31 (VK_1) | 1 key @@ -466,7 +469,6 @@ Gui::handleNativeKeys(int key, quint32 nativeScanCode, quint32 nativeVirtualKey) } #endif #if defined(Q_WS_X11) && defined(Q_OS_LINUX) -#pragma message WARN("TODO: handle keys 0-9 on AZERTY keyboards") // probably only possible on Linux, since scancodes are OS-dependent // https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html Q_UNUSED(nativeVirtualKey);