OpenToonz - An open-source full-featured 2D animation creation software
C
Camera Column Cell color
John Dancel89d222fa515f
diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cppindex caa48b44c..fa58ac1ee 100644--- a/toonz/sources/toonz/xshcellviewer.cpp+++ b/toonz/sources/toonz/xshcellviewer.cpp@@ -1190,7 +1190,7 @@ void CellArea::drawCells(QPainter &p, const QRect toBeUpdated) {// for each framefor (row = r0; row <= r1; row++) {- if (!isColumn) {+ if (col >= 0 && !isColumn) {drawFrameSeparator(p, row, col, true);if (TApp::instance()->getCurrentFrame()->isEditingScene() &&!m_viewer->orientation()->isVerticalTimeline() &&@@ -1677,8 +1677,38 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) {xy.setX(xy.x() + 1);}+ TXshCell nextCell;+ nextCell = xsh->getCell(row + 1, col); // cell in next frame++ int frameAdj = m_viewer->getFrameZoomAdjustment();+ QRect cellRect = o->rect(PredefinedRect::CELL).translated(QPoint(x, y));+ cellRect.adjust(0, 0, -frameAdj, 0);+ QRect rect = cellRect.adjusted(+ 1, 1,+ (!m_viewer->orientation()->isVerticalTimeline() && !nextCell.isEmpty()+ ? 2+ : 0),+ 0);++ // get cell colors+ QColor cellColor, sideColor;+// nothing to drawif (cell.isEmpty() && prevCell.isEmpty()) {+ if (col < 0) {+ TStageObjectId cameraId =+ m_viewer->getXsheet()->getStageObjectTree()->getCurrentCameraId();+ bool isActive =+ cameraId.getIndex() == m_viewer->getXsheet()->getCameraColumnIndex();+ cellColor = (isSelected)+ ? (isActive ? m_viewer->getSelectedActiveCameraColor()+ : m_viewer->getSelectedOtherCameraColor())+ : (isActive ? m_viewer->getActiveCameraColor()+ : m_viewer->getOtherCameraColor());+ cellColor.setAlpha(50);+ // paint cell+ p.fillRect(rect, QBrush(cellColor));+ }drawFrameSeparator(p, row, col, true);if (TApp::instance()->getCurrentFrame()->isEditingScene() &&@@ -1693,18 +1723,6 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) {prevCell.m_frameId == cell.m_frameId);drawFrameSeparator(p, row, col, false, heldFrame);- TXshCell nextCell;- nextCell = xsh->getCell(row + 1, col); // cell in next frame-- int frameAdj = m_viewer->getFrameZoomAdjustment();- QRect cellRect = o->rect(PredefinedRect::CELL).translated(QPoint(x, y));- cellRect.adjust(0, 0, -frameAdj, 0);- QRect rect = cellRect.adjusted(- 1, 1,- (!m_viewer->orientation()->isVerticalTimeline() && !nextCell.isEmpty()- ? 2- : 0),- 0);if (cell.isEmpty()) { // it means previous is not empty// diagonal cross meaning end of levelQColor levelEndColor = m_viewer->getTextColor();@@ -1722,8 +1740,6 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) {return;}- // get cell colors- QColor cellColor, sideColor;if (isReference) {cellColor = (isSelected) ? m_viewer->getSelectedReferenceColumnColor(): m_viewer->getReferenceColumnColor();diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cppindex fbc925d93..f772985b2 100644--- a/toonz/sources/toonz/xshcolumnviewer.cpp+++ b/toonz/sources/toonz/xshcolumnviewer.cpp@@ -698,8 +698,7 @@ void ColumnArea::DrawHeader::drawBaseFill(const QColor &columnColor,QColor colorSelection(m_viewer->getSelectedColumnHead());colorSelection.setAlpha(170);- p.fillRect(rect,- (isSelected || isCameraSelected) ? colorSelection : pastelizer);+ p.fillRect(rect, isSelected ? colorSelection : pastelizer);}void ColumnArea::DrawHeader::drawEye() const {