Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Make Show Camera a sub option of Show Keyframes

manongjohn3fe913a94220
diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.h
index 9001bf96a..46795cabc 100644
--- a/toonz/sources/include/toonz/preferences.h
+++ b/toonz/sources/include/toonz/preferences.h
@@ -469,7 +469,13 @@ public:
}
void enableXsheetCameraColumn(bool on);
- bool isXsheetCameraColumnEnabled() const { return m_showXsheetCameraColumn; }
+ bool isXsheetCameraColumnEnabled() const {
+ return m_showXsheetCameraColumn;
+ }
+
+ bool isXsheetCameraColumnVisible() const {
+ return m_showXsheetCameraColumn && m_showKeyframesOnXsheetCellArea;
+ }
// Animation tab
diff --git a/toonz/sources/toonz/columncommand.cpp b/toonz/sources/toonz/columncommand.cpp
index 637d698c7..cf77797f2 100644
--- a/toonz/sources/toonz/columncommand.cpp
+++ b/toonz/sources/toonz/columncommand.cpp
@@ -1251,20 +1251,20 @@ public:
bool viewer_changed = false;
int startCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
for (int i = startCol; i < xsh->getColumnCount(); i++) {
- /*- 空のカラムの場合は飛ばす -*/
+ /*- Skip if empty column -*/
if (i >= 0 && xsh->isColumnEmpty(i)) continue;
- /*- カラムが取得できなかったら飛ばす -*/
+ /*- Skip if column cannot be obtained -*/
TXshColumn *column = xsh->getColumn(i);
if (!column) continue;
- /*- ターゲットが選択カラムのモードで、選択されていなかった場合は飛ばす -*/
+ /*- Skip if target is in selected column mode and not selected -*/
bool isSelected = selection && selection->isColumnSelected(i);
if (m_target == TARGET_SELECTED && !isSelected) continue;
/*-
- * ターゲットが「カレントカラムより右側」のモードで、iがカレントカラムより左の場合は飛ばす
+ * Skip if target is "right side of current column" mode and i is left of current column
* -*/
if (m_target == TARGET_UPPER && i < cc) continue;
diff --git a/toonz/sources/toonz/columnselection.cpp b/toonz/sources/toonz/columnselection.cpp
index bf9adfc0d..1a5f7e9f8 100644
--- a/toonz/sources/toonz/columnselection.cpp
+++ b/toonz/sources/toonz/columnselection.cpp
@@ -49,8 +49,10 @@ void TColumnSelection::enableCommands() {
enableCommand(this, MI_Resequence, &TColumnSelection::resequence);
enableCommand(this, MI_CloneChild, &TColumnSelection::cloneChild);
enableCommand(this, MI_FoldColumns, &TColumnSelection::hideColumns);
- enableCommand(this, MI_ToggleXsheetCameraColumn,
- &TColumnSelection::toggleCameraColumn);
+
+ if (Preferences::instance()->isShowKeyframesOnXsheetCellAreaEnabled())
+ enableCommand(this, MI_ToggleXsheetCameraColumn,
+ &TColumnSelection::toggleCameraColumn);
enableCommand(this, MI_Reframe1, &TColumnSelection::reframe1Cells);
enableCommand(this, MI_Reframe2, &TColumnSelection::reframe2Cells);
@@ -141,7 +143,8 @@ static bool canMergeColumns(int column, int mColumn, bool forMatchlines) {
if (column < 0 || mColumn < 0) return false;
- if (!xsh || !xsh->getColumn(column) || xsh->getColumn(column)->isLocked()) return false;
+ if (!xsh || !xsh->getColumn(column) || xsh->getColumn(column)->isLocked())
+ return false;
int start, end;
xsh->getCellRange(column, start, end);
@@ -272,6 +275,6 @@ void TColumnSelection::hideColumns() {
void TColumnSelection::toggleCameraColumn() {
Preferences *pref = Preferences::instance();
- pref->enableXsheetCameraColumn(!pref->isXsheetCameraColumnEnabled());
+ pref->enableXsheetCameraColumn(!pref->isXsheetCameraColumnVisible());
TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
}
diff --git a/toonz/sources/toonz/keyframemover.cpp b/toonz/sources/toonz/keyframemover.cpp
index f67a90d47..efdb2f59b 100644
--- a/toonz/sources/toonz/keyframemover.cpp
+++ b/toonz/sources/toonz/keyframemover.cpp
@@ -280,7 +280,7 @@ KeyframeMoverTool::KeyframeMoverTool(XsheetViewer *viewer, bool justMovement)
, m_firstKeyframeMovement(false)
, m_justMovement(justMovement) {
m_mover = new KeyframeMover();
- m_firstCol = Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ m_firstCol = Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
}
//-----------------------------------------------------------------------------
@@ -306,7 +306,7 @@ void KeyframeMoverTool::shiftSelect(int row, int col) {
TXsheet *xsh = getViewer()->getXsheet();
int r0 = 0, c0 = 0, r1 = -1, c1 = -1;
int c = 0;
- if (Preferences::instance()->isXsheetCameraColumnEnabled()) {
+ if (Preferences::instance()->isXsheetCameraColumnVisible()) {
c0--;
c1--;
c--;
diff --git a/toonz/sources/toonz/layerheaderpanel.cpp b/toonz/sources/toonz/layerheaderpanel.cpp
index 92e5b7dd4..4be1da002 100644
--- a/toonz/sources/toonz/layerheaderpanel.cpp
+++ b/toonz/sources/toonz/layerheaderpanel.cpp
@@ -222,7 +222,7 @@ void LayerHeaderPanel::mouseReleaseEvent(QMouseEvent *event) {
if (m_doOnRelease != 0 && totcols > 0) {
int startCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
for (col = startCol; col < totcols; col++) {
if (startCol < 0 || !xsh->isColumnEmpty(col)) {
TXshColumn *column = xsh->getColumn(col);
diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cpp
index b8400ac9d..35dc87812 100644
--- a/toonz/sources/toonz/preferencespopup.cpp
+++ b/toonz/sources/toonz/preferencespopup.cpp
@@ -381,7 +381,7 @@ void PreferencesPopup::onInterfaceFontChanged(int index) {
QString oldTypeface = m_interfaceFontStyle->currentText();
rebuilldFontStyleList();
if (!oldTypeface.isEmpty()) {
- int newIndex = m_interfaceFontStyle->findText(oldTypeface);
+ int newIndex = m_interfaceFontStyle->findText(oldTypeface);
if (newIndex < 0) newIndex = 0;
m_interfaceFontStyle->setCurrentIndex(newIndex);
}
@@ -504,7 +504,7 @@ void PreferencesPopup::onTranspCheckDataChanged(const TPixel32 &,
void PreferencesPopup::onOnionDataChanged(const TPixel32 &, bool isDragging) {
if (isDragging) return;
- bool inksOnly = false;
+ bool inksOnly = false;
if (m_inksOnly) inksOnly = m_inksOnly->isChecked();
m_pref->setOnionData(m_frontOnionColor->getColor(),
m_backOnionColor->getColor(), inksOnly);
@@ -517,7 +517,7 @@ void PreferencesPopup::onOnionDataChanged(const TPixel32 &, bool isDragging) {
//-----------------------------------------------------------------------------
void PreferencesPopup::onOnionDataChanged(int) {
- bool inksOnly = false;
+ bool inksOnly = false;
if (m_inksOnly) inksOnly = m_inksOnly->isChecked();
m_pref->setOnionData(m_frontOnionColor->getColor(),
m_backOnionColor->getColor(), inksOnly);
@@ -874,8 +874,9 @@ void PreferencesPopup::onShowFrameNumberWithLettersChanged(int index) {
//-----------------------------------------------------------------------------
-void PreferencesPopup::onShowKeyframesOnCellAreaChanged(int index) {
- m_pref->enableShowKeyframesOnXsheetCellArea(index == Qt::Checked);
+void PreferencesPopup::onShowKeyframesOnCellAreaChanged(bool checked) {
+ m_pref->enableShowKeyframesOnXsheetCellArea(checked);
+ TApp::instance()->getCurrentScene()->notifyPreferenceChanged("XsheetCamera");
}
//-----------------------------------------------------------------------------
@@ -1512,8 +1513,9 @@ PreferencesPopup::PreferencesPopup()
m_cellsDragBehaviour = new QComboBox();
CheckBox *ignoreAlphaonColumn1CB =
new CheckBox(tr("Ignore Alpha Channel on Levels in Column 1"), this);
- CheckBox *showKeyframesOnCellAreaCB =
- new CheckBox(tr("Show Keyframes on Cell Area"), this);
+ m_showKeyframesOnCellAreaCB =
+ new QGroupBox(tr("Show Keyframes on Cell Area"), this);
+ m_showKeyframesOnCellAreaCB->setCheckable(true);
CheckBox *useArrowKeyToShiftCellSelectionCB =
new CheckBox(tr("Use Arrow Key to Shift Cell Selection"), this);
CheckBox *inputCellsWithoutDoubleClickingCB =
@@ -1911,7 +1913,7 @@ PreferencesPopup::PreferencesPopup()
m_cellsDragBehaviour->addItem(tr("Cells and Column Data"));
m_cellsDragBehaviour->setCurrentIndex(m_pref->getDragCellsBehaviour());
ignoreAlphaonColumn1CB->setChecked(m_pref->isIgnoreAlphaonColumn1Enabled());
- showKeyframesOnCellAreaCB->setChecked(
+ m_showKeyframesOnCellAreaCB->setChecked(
m_pref->isShowKeyframesOnXsheetCellAreaEnabled());
useArrowKeyToShiftCellSelectionCB->setChecked(
m_pref->isUseArrowKeyToShiftCellSelectionEnabled());
@@ -2529,7 +2531,16 @@ PreferencesPopup::PreferencesPopup()
Qt::AlignLeft | Qt::AlignVCenter);
xsheetFrameLay->addWidget(ignoreAlphaonColumn1CB, 4, 0, 1, 2);
- xsheetFrameLay->addWidget(showKeyframesOnCellAreaCB, 5, 0, 1, 2);
+
+ QVBoxLayout *showKeyframesOnCellAreaCBLay = new QVBoxLayout();
+ showKeyframesOnCellAreaCBLay->setMargin(11);
+ {
+ showKeyframesOnCellAreaCBLay->addWidget(
+ showXsheetCameraCB, 0, Qt::AlignLeft | Qt::AlignVCenter);
+ }
+ m_showKeyframesOnCellAreaCB->setLayout(showKeyframesOnCellAreaCBLay);
+
+ xsheetFrameLay->addWidget(m_showKeyframesOnCellAreaCB, 5, 0, 1, 2);
xsheetFrameLay->addWidget(useArrowKeyToShiftCellSelectionCB, 6, 0, 1,
2);
xsheetFrameLay->addWidget(inputCellsWithoutDoubleClickingCB, 7, 0, 1,
@@ -2553,7 +2564,6 @@ PreferencesPopup::PreferencesPopup()
xsheetFrameLay->addWidget(new QLabel(tr("Current Column Color:")), 15,
0, Qt::AlignRight | Qt::AlignVCenter);
xsheetFrameLay->addWidget(m_currentColumnColor, 15, 1);
- xsheetFrameLay->addWidget(showXsheetCameraCB, 16, 0, 1, 2);
}
xsheetFrameLay->setColumnStretch(0, 0);
xsheetFrameLay->setColumnStretch(1, 0);
@@ -2994,8 +3004,8 @@ PreferencesPopup::PreferencesPopup()
SLOT(onXsheetStepChanged()));
ret = ret && connect(m_cellsDragBehaviour, SIGNAL(currentIndexChanged(int)),
SLOT(onDragCellsBehaviourChanged(int)));
- ret = ret && connect(showKeyframesOnCellAreaCB, SIGNAL(stateChanged(int)),
- this, SLOT(onShowKeyframesOnCellAreaChanged(int)));
+ ret = ret && connect(m_showKeyframesOnCellAreaCB, SIGNAL(clicked(bool)), this,
+ SLOT(onShowKeyframesOnCellAreaChanged(bool)));
ret = ret &&
connect(useArrowKeyToShiftCellSelectionCB, SIGNAL(stateChanged(int)),
SLOT(onUseArrowKeyToShiftCellSelectionClicked(int)));
diff --git a/toonz/sources/toonz/preferencespopup.h b/toonz/sources/toonz/preferencespopup.h
index 1a09c8ff8..b3454be3e 100644
--- a/toonz/sources/toonz/preferencespopup.h
+++ b/toonz/sources/toonz/preferencespopup.h
@@ -90,7 +90,8 @@ private:
DVGui::FileField *m_ffmpegPathFileFld, *m_fastRenderPathFileField,
*m_lutPathFileField;
- QGroupBox *m_autoSaveGroup, *m_showXSheetToolbar, *m_colorCalibration;
+ QGroupBox *m_autoSaveGroup, *m_showXSheetToolbar, *m_colorCalibration,
+ *m_showKeyframesOnCellAreaCB;
DVGui::ColorField *m_currentColumnColor;
@@ -193,7 +194,7 @@ private slots:
void onRemoveSceneNumberFromLoadedLevelNameChanged(int index);
void onShowRasterImageDarkenBlendedInViewerChanged(int index);
void onShowFrameNumberWithLettersChanged(int index);
- void onShowKeyframesOnCellAreaChanged(int);
+ void onShowKeyframesOnCellAreaChanged(bool);
void onFfmpegPathChanged();
void onFfmpegTimeoutChanged();
void onFastRenderPathChanged();
diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp
index 3b4023c30..7105ba97d 100644
--- a/toonz/sources/toonz/xshcellviewer.cpp
+++ b/toonz/sources/toonz/xshcellviewer.cpp
@@ -964,7 +964,7 @@ void RenameCellField::keyPressEvent(QKeyEvent *event) {
CellPosition offset(offset * stride);
int movedR0 = std::max(0, r0 + offset.frame());
int firstCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
int movedC0 = std::max(firstCol, c0 + offset.layer());
int diffFrame = movedR0 - r0;
int diffLayer = movedC0 - c0;
diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cpp
index 6a0d37a0c..7045c1959 100644
--- a/toonz/sources/toonz/xshcolumnviewer.cpp
+++ b/toonz/sources/toonz/xshcolumnviewer.cpp
@@ -2291,7 +2291,7 @@ void ColumnArea::mouseReleaseEvent(QMouseEvent *event) {
}
} else if (m_doOnRelease == ToggleAllLock) {
int startCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
for (col = startCol; col < totcols; col++) {
TXshColumn *column = xsh->getColumn(col);
if (!xsh->isColumnEmpty(col)) {
@@ -2440,14 +2440,18 @@ void ColumnArea::contextMenuEvent(QContextMenuEvent *event) {
}
menu.addSeparator();
menu.addAction(cmdManager->getAction(MI_FoldColumns));
- QAction *cameraToggle = cmdManager->getAction(MI_ToggleXsheetCameraColumn);
- bool cameraVisible = Preferences::instance()->isXsheetCameraColumnEnabled();
- if (cameraVisible)
- cameraToggle->setText(tr("Hide Camera Column"));
- else
- cameraToggle->setText(tr("Show Camera Column"));
- menu.addAction(cameraToggle);
- menu.addSeparator();
+ if (Preferences::instance()->isShowKeyframesOnXsheetCellAreaEnabled()) {
+ QAction *cameraToggle =
+ cmdManager->getAction(MI_ToggleXsheetCameraColumn);
+ bool cameraVisible =
+ Preferences::instance()->isXsheetCameraColumnVisible();
+ if (cameraVisible)
+ cameraToggle->setText(tr("Hide Camera Column"));
+ else
+ cameraToggle->setText(tr("Show Camera Column"));
+ menu.addAction(cameraToggle);
+ }
+ menu.addSeparator();
menu.addAction(cmdManager->getAction(MI_ToggleXSheetToolbar));
// force the selected cells placed in n-steps
diff --git a/toonz/sources/toonz/xsheetcmd.cpp b/toonz/sources/toonz/xsheetcmd.cpp
index dbd4b3018..df2aecc3d 100644
--- a/toonz/sources/toonz/xsheetcmd.cpp
+++ b/toonz/sources/toonz/xsheetcmd.cpp
@@ -363,7 +363,7 @@ void GlobalKeyframeUndo::doInsertGlobalKeyframes(
int i, colsCount = columns.size();
int startCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
for (i = startCol; i != colsCount; ++i) {
TStageObjectId objectId;
@@ -395,7 +395,7 @@ void GlobalKeyframeUndo::doRemoveGlobalKeyframes(
int i, colsCount = columns.size();
int startCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
for (i = 0; i != colsCount; ++i) {
TStageObjectId objectId;
@@ -1065,7 +1065,7 @@ public:
int col;
for (col = -1; col < xsh->getColumnCount(); col++) {
TStageObjectId objectId;
- if (col == -1 && Preferences::instance()->isXsheetCameraColumnEnabled())
+ if (col == -1 && Preferences::instance()->isXsheetCameraColumnVisible())
objectId = TStageObjectId::CameraId(xsh->getCameraColumnIndex());
else
objectId = TStageObjectId::ColumnId(col);
@@ -1127,7 +1127,7 @@ public:
int col;
for (col = -1; col < xsh->getColumnCount(); col++) {
TStageObjectId objectId;
- if (col == -1 && Preferences::instance()->isXsheetCameraColumnEnabled())
+ if (col == -1 && Preferences::instance()->isXsheetCameraColumnVisible())
objectId = TStageObjectId::CameraId(xsh->getCameraColumnIndex());
else
objectId = TStageObjectId::ColumnId(col);
@@ -1164,7 +1164,7 @@ public:
TXsheet *xsh = scene->getXsheet();
for (int col = -1; col < xsh->getColumnCount(); col++) {
TStageObjectId objectId;
- if (col == -1 && Preferences::instance()->isXsheetCameraColumnEnabled())
+ if (col == -1 && Preferences::instance()->isXsheetCameraColumnVisible())
objectId = TStageObjectId::CameraId(xsh->getCameraColumnIndex());
else
objectId = TStageObjectId::ColumnId(col);
@@ -1203,7 +1203,7 @@ public:
int col;
for (col = -1; col < xsh->getColumnCount(); col++) {
TStageObjectId objectId;
- if (col == -1 && Preferences::instance()->isXsheetCameraColumnEnabled())
+ if (col == -1 && Preferences::instance()->isXsheetCameraColumnVisible())
objectId = TStageObjectId::CameraId(xsh->getCameraColumnIndex());
else
objectId = TStageObjectId::ColumnId(col);
@@ -1244,7 +1244,7 @@ public:
TStageObjectId objectId =
TApp::instance()->getCurrentObject()->getObjectId();
if (objectId == TStageObjectId::CameraId(xsh->getCameraColumnIndex()) &&
- Preferences::instance()->isXsheetCameraColumnEnabled())
+ Preferences::instance()->isXsheetCameraColumnVisible())
currentColumn = -1;
TStageObject *pegbar = xsh->getStageObject(objectId);
TStageObject::KeyframeMap keyframes;
@@ -1281,7 +1281,7 @@ public:
TStageObjectId objectId =
TApp::instance()->getCurrentObject()->getObjectId();
if (objectId == TStageObjectId::CameraId(xsh->getCameraColumnIndex()) &&
- Preferences::instance()->isXsheetCameraColumnEnabled())
+ Preferences::instance()->isXsheetCameraColumnVisible())
currentColumn = -1;
TStageObject *pegbar = xsh->getStageObject(objectId);
TStageObject::KeyframeMap keyframes;
@@ -1318,7 +1318,7 @@ public:
int col;
for (col = -1; col <= currentColumn; col++) {
TStageObjectId objectId;
- if (col == -1 && Preferences::instance()->isXsheetCameraColumnEnabled())
+ if (col == -1 && Preferences::instance()->isXsheetCameraColumnVisible())
objectId = TStageObjectId::CameraId(xsh->getCameraColumnIndex());
else
objectId = TStageObjectId::ColumnId(col);
@@ -1359,7 +1359,7 @@ public:
TStageObjectId objectId =
TApp::instance()->getCurrentObject()->getObjectId();
if (objectId == TStageObjectId::CameraId(xsh->getCameraColumnIndex()) &&
- Preferences::instance()->isXsheetCameraColumnEnabled())
+ Preferences::instance()->isXsheetCameraColumnVisible())
currentColumn = -1;
selection->selectNone();
@@ -1403,7 +1403,7 @@ public:
int col;
for (col = -1; col < xsh->getColumnCount(); col++) {
TStageObjectId objectId;
- if (col == -1 && Preferences::instance()->isXsheetCameraColumnEnabled())
+ if (col == -1 && Preferences::instance()->isXsheetCameraColumnVisible())
objectId = TStageObjectId::CameraId(xsh->getCameraColumnIndex());
else
objectId = TStageObjectId::ColumnId(col);
diff --git a/toonz/sources/toonz/xsheetdragtool.cpp b/toonz/sources/toonz/xsheetdragtool.cpp
index 9733642c9..312fb4aed 100644
--- a/toonz/sources/toonz/xsheetdragtool.cpp
+++ b/toonz/sources/toonz/xsheetdragtool.cpp
@@ -180,7 +180,7 @@ public:
TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
int row = pos.frame(), col = pos.layer();
int firstCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
if (col < firstCol || (!getViewer()->orientation()->isVerticalTimeline() &&
col >= xsh->getColumnCount()))
return;
@@ -1549,7 +1549,7 @@ public:
int col = pos.layer();
if (!m_enabled) return;
int firstCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
if (col < firstCol || (!getViewer()->orientation()->isVerticalTimeline() &&
col >= xsh->getColumnCount()))
return;
diff --git a/toonz/sources/toonz/xsheetviewer.cpp b/toonz/sources/toonz/xsheetviewer.cpp
index 22b5bc5fa..08272c088 100644
--- a/toonz/sources/toonz/xsheetviewer.cpp
+++ b/toonz/sources/toonz/xsheetviewer.cpp
@@ -664,7 +664,7 @@ bool XsheetViewer::refreshContentSize(int dx, int dy) {
contentSize = positionToXY(CellPosition(frameCount + 1, columnCount + 1));
else {
int firstCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
contentSize = positionToXY(CellPosition(frameCount + 1, firstCol));
ColumnFan *fan = xsh->getColumnFan(m_orientation);
@@ -718,7 +718,7 @@ void XsheetViewer::updateAreeSize() {
CellPosition(xsh->getFrameCount() + 1, xsh->getColumnCount() + 1));
else {
int firstCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
areaFilled =
positionToXY(CellPosition(xsh->getFrameCount() + 1, firstCol));
@@ -1196,7 +1196,7 @@ void XsheetViewer::keyPressEvent(QKeyEvent *event) {
TCellSelection *cellSel =
dynamic_cast<TCellSelection *>(TSelection::getCurrent());
int firstCol =
- Preferences::instance()->isXsheetCameraColumnEnabled() ? -1 : 0;
+ Preferences::instance()->isXsheetCameraColumnVisible() ? -1 : 0;
// Use arrow keys to shift the cell selection. Ctrl + arrow keys to resize the
// selection range.
if (Preferences::instance()->isUseArrowKeyToShiftCellSelectionEnabled() &&
diff --git a/toonz/sources/toonzlib/columnfan.cpp b/toonz/sources/toonzlib/columnfan.cpp
index 61e5a1ace..e60079ea2 100644
--- a/toonz/sources/toonzlib/columnfan.cpp
+++ b/toonz/sources/toonzlib/columnfan.cpp
@@ -53,7 +53,7 @@ void ColumnFan::update() {
//-----------------------------------------------------------------------------
int ColumnFan::layerAxisToCol(int coord) const {
- if (Preferences::instance()->isXsheetCameraColumnEnabled()) {
+ if (Preferences::instance()->isXsheetCameraColumnVisible()) {
int firstCol =
m_cameraActive
? m_unfolded
@@ -75,7 +75,7 @@ int ColumnFan::layerAxisToCol(int coord) const {
int ColumnFan::colToLayerAxis(int col) const {
int m = m_columns.size();
int firstCol = 0;
- if (Preferences::instance()->isXsheetCameraColumnEnabled()) {
+ if (Preferences::instance()->isXsheetCameraColumnVisible()) {
if (col < -1) return -m_unfolded;
if (col < 0) return 0;
firstCol =
@@ -148,7 +148,7 @@ void ColumnFan::copyFoldedStateFrom(const ColumnFan &from) {
void ColumnFan::saveData(
TOStream &os) { // only saves indices of folded columns
int index, n = (int)m_columns.size();
- if (Preferences::instance()->isXsheetCameraColumnEnabled() && !m_cameraActive)
+ if (Preferences::instance()->isXsheetCameraColumnVisible() && !m_cameraActive)
os << -1 << 1;
for (index = 0; index < n;) {
while (index < n && m_columns[index].m_active) index++;