Compare commits

...

22 commits

Author SHA1 Message Date
Razzaline 7c03b12d9a
Merge branch 'tahoma2d:master' into libdeflate-linker-fix 2023-11-15 03:15:14 +13:00
manongjohn b6898491d7
Merge pull request #1273 from manongjohn/saving_syncColorSetting
Save syncColorSetting only if not default
2023-11-12 07:26:24 -05:00
manongjohn 5131cf0d36
Merge pull request #1271 from melieconiek/onion-all-frames-toggle
Onion Skin All Frames or New Exposures Toggle
2023-11-10 19:00:18 -05:00
Razzaline Reindell be259cd997 Link libdeflate for Linux builds (cmake) 2023-11-10 17:45:33 +13:00
manongjohn 47d1fc1fa5
Merge pull request #1269 from manongjohn/hide_clipping_mask_option
Hide Clipping Mask Options on non-Vector columns
2023-11-09 06:42:02 -05:00
manongjohn 9f2d58a0fe Save syncColorSetting if not default 2023-11-07 08:17:55 -05:00
melieconiek 8d51a22867 Change command name again. 2023-11-06 16:05:00 -05:00
manongjohn e48aeb4b54
Merge pull request #1265 from manongjohn/2d_room_update
2D room update
2023-11-05 19:04:28 -05:00
melieconiek 076337229f Change setting names. 2023-11-05 09:47:03 -05:00
melieconiek f3ff2e9d5e Save Extend to Scene & Every Frame to Env file. 2023-11-05 09:36:29 -05:00
manongjohn d6fa1ab8e9 Hide Clipping Mask Options on non-Vector columns 2023-11-04 13:39:24 -04:00
manongjohn ecec1d868d
Merge pull request #1263 from manongjohn/fix_config_menu_below_screen
Fix column settings menu below screen
2023-11-04 08:34:12 -04:00
manongjohn 874db59822
Merge pull request #1262 from manongjohn/fix_multiple_rendering_overlay
Fix missing scene overlay for Multiple Rendering options
2023-11-03 17:09:48 -04:00
manongjohn 0ab28b35a1 Fix missing viewer frame slider 2023-11-02 22:22:27 -04:00
manongjohn 21c268bee4
Merge pull request #1260 from TomDoingArt/Fix-to-allow-partial-coloring-of-gap-close-line
Fix for gap close lines
2023-11-02 22:04:01 -04:00
melieconiek 72eb546f3f Add separate option to render onion skin on every frame instead of being dependent on numbering mode. 2023-11-01 17:20:49 -04:00
manongjohn fcc03c6e47 2D room update 2023-11-01 07:47:50 -04:00
manongjohn 730c66149d Fix column settings menu below screen 2023-10-30 19:01:51 -04:00
manongjohn d07810b63e Fix missing scene overlay for Multiple Rendering options 2023-10-29 21:45:41 -04:00
manongjohn 56d47b30bd
Merge pull request #1261 from manongjohn/update_canon_edsdk
Update Canon EDSDK to v13.17.10
2023-10-29 18:57:51 -04:00
manongjohn ed2ad035c6 Update Canon SDK to v13.17.10 2023-10-29 13:11:13 -04:00
Tom 81934292d8 Fix for gap close lines
A fix to stop coloring gap close lines beyond the fill area.
2023-10-28 21:01:57 -04:00
22 changed files with 395 additions and 192 deletions

View file

@ -26,11 +26,11 @@ jobs:
- name: Get CanonSDK
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' }}
run: |
wget --header="Authorization: token ${{ secrets.TAHOMA2D_TOKEN }}" --header="Accept:application/octet-stream" -O EDSDK_v131231_Macintosh.zip https://api.github.com/repos/tahoma2d/CanonSDK/releases/assets/25267390
unzip EDSDK_v131231_Macintosh.zip -d EDSDK_v131231_Macintosh
unzip EDSDK_v131231_Macintosh/Macintosh.dmg.zip -d EDSDK_v131231_Macintosh
7z x EDSDK_v131231_Macintosh/Macintosh.dmg -oEDSDK_v131231_Macintosh
mv EDSDK_v131231_Macintosh/Macintosh/EDSDK/* thirdparty/canon
wget --header="Authorization: token ${{ secrets.TAHOMA2D_TOKEN }}" --header="Accept:application/octet-stream" -O EDSDK_Macintosh.zip https://api.github.com/repos/tahoma2d/CanonSDK/releases/assets/132789028
unzip EDSDK_Macintosh.zip -d EDSDK_Macintosh
unzip EDSDK_Macintosh/Macintosh.dmg.zip -d EDSDK_Macintosh
7z x EDSDK_Macintosh/Macintosh.dmg -oEDSDK_Macintosh
mv EDSDK_Macintosh/Macintosh/EDSDK/* thirdparty/canon
cd thirdparty/canon/framework/EDSDK.framework/Versions
rm Current
ln -s A Current

View file

@ -24,11 +24,11 @@ jobs:
- name: Get CanonSDK
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' }}
run: |
curl -H "Authorization: token ${{ secrets.TAHOMA2D_TOKEN }}" -H "Accept:application/octet-stream" -fsSL -o EDSDK_v131231_Windows.zip https://api.github.com/repos/tahoma2d/CanonSDK/releases/assets/25267396
7z x EDSDK_v131231_Windows.zip -oEDSDK_v131231_Windows
move EDSDK_v131231_Windows\EDSDK\Header thirdparty\canon
move EDSDK_v131231_Windows\EDSDK_64\Dll thirdparty\canon
move EDSDK_v131231_Windows\EDSDK_64\Library thirdparty\canon
curl -H "Authorization: token ${{ secrets.TAHOMA2D_TOKEN }}" -H "Accept:application/octet-stream" -fsSL -o EDSDK_Windows.zip https://api.github.com/repos/tahoma2d/CanonSDK/releases/assets/132789036
7z x EDSDK_Windows.zip -oEDSDK_Windows
move EDSDK_Windows\EDSDK\Header thirdparty\canon
move EDSDK_Windows\EDSDK_64\Dll thirdparty\canon
move EDSDK_Windows\EDSDK_64\Library thirdparty\canon
- name: Get 3rd Party Apps
run: |
ci-scripts\windows\tahoma-get3rdpartyapps.bat

View file

@ -153,7 +153,7 @@ function checkLibFile() {
echo "Fixing $DEPFILE in $LIBFILE"
if [ "$X" != "" ]
then
local Y=`echo $DEPFILE | sed -e"s/^.*\/\.\.\///"`
local Y=`echo $DEPFILE | sed -e"s/^.*\/\.\.\///" -e"s/@rpath.//"`
install_name_tool -change $DEPFILE @executable_path/../Frameworks/$Y $LIBFILE
else
install_name_tool -change $DEPFILE @executable_path/../Frameworks/$Y $LIBFILE

View file

@ -1,25 +1,24 @@
[room]
pane_0\name=StyleEditor
pane_0\geometry=@Rect(34 30 259 358)
pane_0\geometry=@Rect(38 30 259 390)
pane_0\isVertical=true
pane_0\visibleParts=5
pane_0\splitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1i\0\0\0 \x1\xff\xff\xff\xff\x1\0\0\0\x2\0)
pane_1\name=Timeline
pane_1\geometry=@Rect(34 764 1886 211)
pane_1\geometry=@Rect(38 828 1882 269)
pane_1\orientation=LeftToRight
pane_1\frameZoomFactor=100
pane_2\name=SceneViewer
pane_2\geometry=@Rect(297 30 1623 704)
pane_2\visibleParts=5
pane_2\geometry=@Rect(301 30 1619 794)
pane_2\viewerVisibleParts=7
pane_2\consoleParts=3435969580
pane_3\name=ToolBar
pane_3\geometry=@Rect(0 30 30 945)
pane_3\geometry=@Rect(0 30 34 1067)
pane_4\name=ToolOptions
pane_4\geometry=@Rect(0 0 1920 26)
pane_5\name=LevelPalette
pane_5\geometry=@Rect(34 392 259 368)
pane_5\geometry=@Rect(38 424 259 400)
pane_5\toolbarVisibleMsk=1
pane_5\viewtype=0
pane_6\name=CommandBar
pane_6\geometry=@Rect(297 738 1623 26)
hierarchy="-1 1 [ 4 [ 3 [ [ [ 0 5 ] [ 2 6 ] ] 1 ] ] ] "
hierarchy="-1 1 [ 4 [ 3 [ [ [ 0 5 ] 2 ] 1 ] ] ] "
name=2D

View file

@ -11,8 +11,7 @@
<command>MI_Dup</command>
<separator/>
<command>MI_Collapse</command>
<command>MI_OpenChild</command>
<command>MI_CloseChild</command>
<command>MI_ToggleXsheetBreadcrumbs</command>
<command>MI_ToggleEditInPlace</command>
</commandbar>

View file

@ -1,5 +1,4 @@
<commandbar>
<commandbar>
<command>MI_ToggleAutoCreate</command>
<command>MI_ToggleCreationInHoldCells</command>
<command>MI_ToggleAutoStretch</command>
@ -8,17 +7,14 @@
<command>MI_NewRasterLevel</command>
<command>MI_NewToonzRasterLevel</command>
<command>MI_NewVectorLevel</command>
<separator/>
<separator/>
<command>MI_Reframe1</command>
<command>MI_Reframe2</command>
<command>MI_Reframe3</command>
<separator/>
<command>MI_Dup</command>
<separator/>
<command>MI_Collapse</command>
<command>MI_OpenChild</command>
<command>MI_CloseChild</command>
<command>MI_Collapse</command>
<command>MI_ToggleXsheetBreadcrumbs</command>
<command>MI_ToggleEditInPlace</command>
</commandbar>
</commandbar>

View file

@ -195,6 +195,7 @@ elseif(BUILD_ENV_UNIXLIKE)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions(-DLINUX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ldeflate")
elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku")
add_definitions(-DHAIKU)
set(PRELOAD_VARIABLE "LIBRARY_PATH")

View file

@ -46,8 +46,7 @@ public:
};
public:
OnionSkinMask()
: m_enabled(false), m_wholeScene(false), m_LightTableStatus(false) {}
OnionSkinMask();
void clear();
@ -87,7 +86,10 @@ public:
void enable(bool on) { m_enabled = on; }
bool isWholeScene() const { return m_wholeScene; }
void setIsWholeScene(bool wholeScene) { m_wholeScene = wholeScene; }
void setIsWholeScene(bool wholeScene);
bool isEveryFrame() const { return m_everyFrame; }
void setIsEveryFrame(bool everyFrame);
/*!
Returns the fade (transparency) value, in the [0.0, 1.0] range, corresponding to
@ -142,6 +144,7 @@ private:
std::vector<int> m_fos, m_mos; //!< Fixed and Mobile Onion Skin indices
bool m_enabled; //!< Whether onion skin is enabled
bool m_wholeScene; //!< Whether the OS works on the entire scene
bool m_everyFrame; //!< Whether the OS renders every frame or only on new exposures.
ShiftTraceStatus m_shiftTraceStatus;
TAffine m_ghostAff[2];

View file

@ -2022,8 +2022,9 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {
ret = ret && connect(m_stopMotion->m_gphotocam,
SIGNAL(liveViewOffsetChangedSignal(int)), this,
SLOT(onLiveViewCompensationChangedSignal(int)));
ret = ret && connect(m_stopMotion->m_canon, SIGNAL(focusCheckToggled(bool)),
this, SLOT(onFocusCheckToggled(bool)));
ret =
ret && connect(m_stopMotion->m_gphotocam, SIGNAL(focusCheckToggled(bool)),
this, SLOT(onFocusCheckToggled(bool)));
ret = ret &&
connect(m_stopMotion->m_gphotocam, SIGNAL(pickFocusCheckToggled(bool)),
this, SLOT(onPickFocusCheckToggled(bool)));

View file

@ -1052,12 +1052,12 @@ void fillAreaWithUndo(const TImageP &img, const TRectD &area, TStroke *stroke,
for (int tempY = 0; tempY < tempRaster->getLy(); tempY++) {
for (int tempX = 0; tempX < tempRaster->getLx();
tempX++, tempPix++, keepPix++) {
if (tempPix->getInk() < IGNORECOLORSTYLE) {
keepPix->setInk(tempPix->getInk());
}
if (tempPix->getPaint() < IGNORECOLORSTYLE) {
keepPix->setPaint(tempPix->getPaint());
if (tempPix->getInk() >= IGNORECOLORSTYLE || tempPix->getPaint() >= IGNORECOLORSTYLE) {
continue;
}
keepPix->setInk(tempPix->getInk());
keepPix->setPaint(tempPix->getPaint());
keepPix->setTone(tempPix->getTone());
}
}

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="100%"
height="100%"
viewBox="0 0 16 16"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
id="svg9"
sodipodi:docname="toggle_sub_nav.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs13">
</defs><sodipodi:namedview
id="namedview11"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="31.775611"
inkscape:cx="11.596945"
inkscape:cy="9.1264964"
inkscape:window-width="1920"
inkscape:window-height="1141"
inkscape:window-x="-7"
inkscape:window-y="-7"
inkscape:window-maximized="1"
inkscape:current-layer="svg9" />
<g
id="g8948"><rect
id="bg"
x="0"
y="0"
width="16"
height="16"
style="fill:#878787;fill-opacity:0" /><path
d="m 11,9 h 4 V 7 H 12 V 4 H 8 V 1 H 0 V 9 H 1 V 8 2 H 7 V 9 H 8 V 5 h 3 z m 1,0 V 8 h 2 v 1 z"
id="path3"
sodipodi:nodetypes="cccccccccccccccccccccccc" /><path
d="M 4.499,8 H 11 V 7 H 0 V 8 Z M 1,10 c 0.0027,0.526025 -0.257,0.696 0,1 H 14 V 10 Z M 0,4 V 5 H 7 V 4 Z"
style="fill-opacity:0.5"
id="path5"
sodipodi:nodetypes="cccccccccccccccc" /><path
id="rect4189"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none"
d="m 0,10 v 6 h 16 v -6 z m 1,1 h 4 l 3,2 -3,2 H 1 l 3,-2 z m 7,0 h 4 l 3,2 -3,2 H 8 l 3,-2 z"
sodipodi:nodetypes="ccccccccccccccccccc" /></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -2482,7 +2482,8 @@ void MainWindow::defineActions() {
createRightClickMenuAction(MI_ToggleQuickToolbar,
QT_TR_NOOP("Toggle Quick Toolbar"), "");
createRightClickMenuAction(MI_ToggleXsheetBreadcrumbs,
QT_TR_NOOP("Toggle Sub-Scene Navigation Bar"), "");
QT_TR_NOOP("Toggle Sub-Scene Navigation Bar"), "",
"toggle_sub_nav");
createRightClickMenuAction(MI_ToggleXsheetCameraColumn,
QT_TR_NOOP("Show/Hide Camera Column"), "");
createRightClickMenuAction(MI_SetKeyframes, QT_TR_NOOP("&Set Key"), "Z",

View file

@ -44,6 +44,13 @@ bool OnioniSkinMaskGUI::OnionSkinSwitcher::isWholeScene() const {
//------------------------------------------------------------------------------
bool OnioniSkinMaskGUI::OnionSkinSwitcher::isEveryFrame() const {
OnionSkinMask osm = getMask();
return osm.isEveryFrame();
}
//------------------------------------------------------------------------------
void OnioniSkinMaskGUI::OnionSkinSwitcher::activate() {
OnionSkinMask osm = getMask();
if (osm.isEnabled() && !osm.isEmpty()) return;
@ -81,6 +88,22 @@ void OnioniSkinMaskGUI::OnionSkinSwitcher::setSingleLevel() {
setMask(osm);
}
//------------------------------------------------------------------------------
void OnioniSkinMaskGUI::OnionSkinSwitcher::setEveryFrame() {
OnionSkinMask osm = getMask();
osm.setIsEveryFrame(true);
setMask(osm);
}
//------------------------------------------------------------------------------
void OnioniSkinMaskGUI::OnionSkinSwitcher::setNewExposure() {
OnionSkinMask osm = getMask();
osm.setIsEveryFrame(false);
setMask(osm);
}
void OnioniSkinMaskGUI::OnionSkinSwitcher::clearFOS() {
OnionSkinMask osm = getMask();
@ -125,6 +148,17 @@ void OnioniSkinMaskGUI::addOnionSkinCommand(QMenu *menu, bool isFilmStrip) {
menu->connect(extendOnionSkinToScene, SIGNAL(triggered()), &switcher,
SLOT(setWholeScene()));
}
if (!switcher.isEveryFrame()) {
QAction *onionSkinEveryFrame =
menu->addAction(QString(QObject::tr("Onion Skin On All Frames")));
menu->connect(onionSkinEveryFrame, SIGNAL(triggered()), &switcher,
SLOT(setEveryFrame()));
} else {
QAction *onionSkinNewExposure =
menu->addAction(QString(QObject::tr("Onion Skin On Drawings")));
menu->connect(onionSkinNewExposure, SIGNAL(triggered()), &switcher,
SLOT(setNewExposure()));
}
OnionSkinMask osm = switcher.getMask();
if (osm.getFosCount() || osm.getMosCount()) {
QAction *clearAllOnionSkins = menu->addAction(

View file

@ -33,12 +33,15 @@ public:
bool isActive() const;
bool isWholeScene() const;
bool isEveryFrame() const;
public slots:
void activate();
void deactivate();
void setWholeScene();
void setSingleLevel();
void setEveryFrame();
void setNewExposure();
void clearFOS();
void clearMOS();
void clearOS();

View file

@ -400,6 +400,8 @@
<file>icons/dark/actions/16/next_nav_tag.svg</file>
<file>icons/dark/actions/16/prev_nav_tag.svg</file>
<file>icons/dark/actions/16/toggle_sub_nav.svg</file>
<!-- Modes, Types, Options -->
<file>icons/dark/actions/16/ink_check.svg</file>
<file>icons/dark/actions/16/inks_only.svg</file>

View file

@ -2361,6 +2361,7 @@ void ColumnTransparencyPopup::setColumn(TXshColumn *column) {
m_invertMask->blockSignals(true);
m_renderMask->blockSignals(true);
if (containsVectorLevel(m_column->getIndex())) {
m_maskGroupBox->setVisible(true);
m_maskGroupBox->setChecked(m_column->isMask());
m_maskGroupBox->setEnabled(true);
m_invertMask->setChecked(m_column->isInvertedMask());
@ -2370,6 +2371,7 @@ void ColumnTransparencyPopup::setColumn(TXshColumn *column) {
m_maskGroupBox->setEnabled(false);
m_invertMask->setChecked(false);
m_renderMask->setChecked(false);
m_maskGroupBox->setVisible(false);
}
m_maskGroupBox->blockSignals(false);
m_invertMask->blockSignals(false);
@ -2999,23 +3001,32 @@ void ColumnArea::mouseReleaseEvent(QMouseEvent *event) {
m_columnTransparencyPopup->move(event->globalPos().x() + x,
event->globalPos().y() - y);
openTransparencyPopup();
// make sure the popup doesn't go off the screen to the right
QDesktopWidget *desktop = qApp->desktop();
QRect screenRect = desktop->screenGeometry(app->getMainWindow());
int popupLeft = event->globalPos().x() + x;
int popupRight = popupLeft + m_columnTransparencyPopup->width();
int popupLeft = event->globalPos().x() + x;
int popupRight = popupLeft + m_columnTransparencyPopup->width();
int popupTop = event->globalPos().y() - y;
int popupBottom = popupTop + m_columnTransparencyPopup->height();
// first condition checks if popup is on same monitor as main app;
// if popup is on different monitor, leave as is
if (popupLeft < screenRect.right() && popupRight > screenRect.right()) {
int distance = popupRight - screenRect.right();
m_columnTransparencyPopup->move(
m_columnTransparencyPopup->x() - distance,
m_columnTransparencyPopup->y());
int distanceX = 0;
int distanceY = 0;
if (popupLeft < screenRect.right() && popupRight > screenRect.right())
distanceX = popupRight - screenRect.right();
if (popupTop < screenRect.bottom() &&
popupBottom > screenRect.bottom()) {
distanceY = popupBottom - screenRect.bottom();
distanceX -= configRect.width() - 1; // Move right to not hide button
}
openTransparencyPopup();
if (distanceX != 0 || distanceY != 0)
m_columnTransparencyPopup->move(
m_columnTransparencyPopup->x() - distanceX,
m_columnTransparencyPopup->y() - distanceY);
}
} else if (m_doOnRelease == ToggleAllPreviewVisible) {
for (col = 0; col < totcols; col++) {

View file

@ -142,124 +142,6 @@ bool areRectPixelsTransparent(TPixel32 *pixels, TRect rect, int wrap) {
} // namespace
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void finishGapLine(const TRasterCM32P &r, const TRasterCM32P &combined,
const TPoint &pin, int clickedColorStyle, int fillColorStyle,
int closeColorStyle, int searchRay, TRect *insideRect,
bool closeGaps) {
r->lock();
TRasterCM32P myCombined;
if (!combined.getPointer() || combined->isEmpty()) {
myCombined = r;
} else {
myCombined = combined;
}
TPixelCM32 *pixels = (TPixelCM32 *)r->getRawData();
TPixelCM32 *combinedPixels = (TPixelCM32 *)myCombined->getRawData();
;
TPoint p = pin;
int filledNeighbor = 0;
int unfilledNeighbor = 0;
int inkStyle = 0;
int paintStyle = 0;
int toneValue = 0;
TPixelCM32 *pix = pixels + (p.y * r->getWrap() + p.x);
TPixelCM32 *pixc = combinedPixels + (p.y * myCombined->getWrap() + p.x);
std::stack<TPoint> gapLinePixels;
std::stack<TPoint> seeds;
seeds.push(p);
while (!seeds.empty()) {
p = seeds.top();
seeds.pop();
if (!r->getBounds().contains(p)) {
continue;
}
if (insideRect && !insideRect->contains(p)) {
continue;
}
TPixelCM32 *pix = pixels + (p.y * r->getWrap() + p.x);
TPixelCM32 *pixc = combinedPixels + (p.y * myCombined->getWrap() + p.x);
// handle gap close pixel
if (pix->getInk() == GAP_CLOSE_USED) continue;
if (pix->getInk() == GAP_CLOSE_TEMP) {
pix->setInk(GAP_CLOSE_USED);
// push to the gapLinePixels collection for later processing as a line
gapLinePixels.push(p);
// push neighboring pixels into the seeds queue
seeds.push(TPoint(p.x - 1, p.y - 1)); // sw
seeds.push(TPoint(p.x - 1, p.y)); // west
seeds.push(TPoint(p.x - 1, p.y + 1)); // nw
seeds.push(TPoint(p.x, p.y - 1)); // south
seeds.push(TPoint(p.x, p.y + 1)); // north
seeds.push(TPoint(p.x + 1, p.y - 1)); // se
seeds.push(TPoint(p.x + 1, p.y)); // east
seeds.push(TPoint(p.x + 1, p.y + 1)); // ne
continue;
}
// a neighboring filled pixel
if (pix->getTone() > 0 && pix->getPaint() == fillColorStyle) {
filledNeighbor++;
continue;
}
// a neighboring fillable but unfilled pixel
if ((pix->getTone() == 255 &&
((pix->getPaint() == clickedColorStyle) || (pix->getPaint() == 0) ||
(pix->getPaint() == IGNORECOLORSTYLE))) &&
(pixc->getTone() == 255 && ((pixc->getPaint() == clickedColorStyle) ||
(pixc->getPaint() == 0)))) {
unfilledNeighbor++;
continue;
}
}
// determine the final disposition of the gap line
if (filledNeighbor > 0) {
if (unfilledNeighbor > 0) {
if (closeGaps) {
inkStyle = closeColorStyle;
paintStyle = fillColorStyle;
toneValue = 0;
} else {
inkStyle = 0;
paintStyle = fillColorStyle;
toneValue = 255;
}
} else {
inkStyle = 0;
paintStyle = fillColorStyle;
toneValue = 255;
}
} else {
inkStyle = IGNORECOLORSTYLE;
paintStyle = 0;
toneValue = 0;
}
// process the stored gap close line pixels
while (!gapLinePixels.empty()) {
p = gapLinePixels.top();
gapLinePixels.pop();
TPixelCM32 *pix = pixels + (p.y * r->getWrap() + p.x);
pix->setInk(inkStyle);
pix->setPaint(paintStyle);
pix->setTone(toneValue);
}
r->unlock();
}
//-----------------------------------------------------------------------------
// This function finishes candidate gap lines that were created
// during a fill process.
@ -269,42 +151,219 @@ void finishGapLines(TRasterCM32P &rin, TRect &rect, const TRasterCM32P &rbefore,
int clickedColorStyle, int fillIndex, int closeColorStyle,
bool closeGaps) {
assert(plt);
rin->lock();
TRasterCM32P r = rin->extract(rect);
assert(r->getSize() == rbefore->getSize());
assert(r->getSize() == combined->getSize());
TRasterCM32P myCombined;
if (!combined.getPointer() || combined->isEmpty()) {
myCombined = r;
} else {
myCombined = combined;
}
int i, j;
int filledNeighbor = 0;
int unfilledNeighbor = 0;
std::stack<TPoint> gapLinePixels;
TPoint p;
// process all the pixels looking for gap close pixels
for (i = 0; i < r->getLy(); i++) {
TPixelCM32 *pix = r->pixels(i);
TPixelCM32 *pixb = rbefore->pixels(i);
TPixelCM32 *pixc = myCombined->pixels(i);
for (j = 0; j < r->getLx(); j++, pix++, pixb++) {
int paint = pix->getPaint();
int tone = pix->getTone();
int ink = pix->getInk();
if (ink == GAP_CLOSE_TEMP &&
(
// north
(i < rin->getLy() - 1 &&
(pix + rin->getWrap())->getPaint() == fillIndex &&
(pix + rin->getWrap())->getPaint() !=
(pixb + rbefore->getWrap())->getPaint())
// south
|| (i > 0 && (pix - rin->getWrap())->getPaint() == fillIndex &&
(pix - rin->getWrap())->getPaint() !=
(pixb - rbefore->getWrap())->getPaint())
// east
|| (j < rin->getLx() - 1 && (pix + 1)->getPaint() == fillIndex &&
(pix + 1)->getPaint() != (pixb + 1)->getPaint())
// west
|| (j > 0 && (pix - 1)->getPaint() == fillIndex &&
(pix - 1)->getPaint() != (pixb - 1)->getPaint()))) {
finishGapLine(rin, combined, TPoint(j, i) + rect.getP00(),
clickedColorStyle, fillIndex, closeColorStyle, 0, &rect,
closeGaps);
if (ink != GAP_CLOSE_TEMP) continue;
// current pixel is a gap close pixel, does it qualify to be kept?
filledNeighbor = 0;
unfilledNeighbor = 0;
// check for new filled neighbor
// north
if (i < rin->getLy() - 1 && (pix + rin->getWrap())->getTone() == 255 &&
(pix + rin->getWrap())->getInk() < IGNORECOLORSTYLE &&
(pix + rin->getWrap())->getPaint() == fillIndex &&
(pix + rin->getWrap())->getPaint() !=
(pixb + rbefore->getWrap())->getPaint()) {
filledNeighbor++;
}
// south
if (i > 0 && (pix - rin->getWrap())->getTone() == 255 &&
(pix - rin->getWrap())->getInk() < IGNORECOLORSTYLE &&
(pix - rin->getWrap())->getPaint() == fillIndex &&
(pix - rin->getWrap())->getPaint() !=
(pixb - rbefore->getWrap())->getPaint()) {
filledNeighbor++;
}
// east
if (j < rin->getLx() - 1 && (pix + 1)->getTone() == 255 &&
(pix + 1)->getInk() < IGNORECOLORSTYLE &&
(pix + 1)->getPaint() == fillIndex &&
(pix + 1)->getPaint() != (pixb + 1)->getPaint()) {
filledNeighbor++;
}
// west
if (j > 0 && (pix - 1)->getTone() == 255 &&
(pix - 1)->getInk() < IGNORECOLORSTYLE &&
(pix - 1)->getPaint() == fillIndex &&
(pix - 1)->getPaint() != (pixb - 1)->getPaint()) {
filledNeighbor++;
}
// Check for fillable but unfilled pixel neighbor
// north
if ((i < rin->getLy() - 1 && (pix + rin->getWrap())->getTone() == 255 &&
(((pix + rin->getWrap())->getPaint() == clickedColorStyle) ||
((pix + rin->getWrap())->getPaint() == 0) ||
((pix + rin->getWrap())->getPaint() == IGNORECOLORSTYLE))) &&
((pixc + myCombined->getWrap())->getTone() == 255 &&
(((pixc + myCombined->getWrap())->getPaint() == clickedColorStyle) ||
((pixc + myCombined->getWrap())->getPaint() == 0)))) {
unfilledNeighbor++;
}
// south
if ((i > 0 && (pix - rin->getWrap())->getTone() == 255 &&
(((pix - rin->getWrap())->getPaint() == clickedColorStyle) ||
((pix - rin->getWrap())->getPaint() == 0) ||
((pix - rin->getWrap())->getPaint() == IGNORECOLORSTYLE))) &&
((pixc - myCombined->getWrap())->getTone() == 255 &&
(((pixc - myCombined->getWrap())->getPaint() == clickedColorStyle) ||
((pixc - myCombined->getWrap())->getPaint() == 0)))) {
unfilledNeighbor++;
}
// east
if ((j < rin->getLx() - 1 && (pix + 1)->getTone() == 255 &&
(((pix + 1)->getPaint() == clickedColorStyle) ||
((pix + 1)->getPaint() == 0) ||
((pix + 1)->getPaint() == IGNORECOLORSTYLE))) &&
((pixc + 1)->getTone() == 255 &&
(((pixc + 1)->getPaint() == clickedColorStyle) ||
((pixc + 1)->getPaint() == 0)))) {
unfilledNeighbor++;
}
// west
if ((j > 0 && (pix - 1)->getTone() == 255 &&
(((pix - 1)->getPaint() == clickedColorStyle) ||
((pix - 1)->getPaint() == 0) ||
((pix - 1)->getPaint() == IGNORECOLORSTYLE))) &&
((pixc - 1)->getTone() == 255 &&
(((pixc - 1)->getPaint() == clickedColorStyle) ||
((pixc - 1)->getPaint() == 0)))) {
unfilledNeighbor++;
}
// determine the final disposition of the gap line pixel
if (filledNeighbor > 0) {
if (unfilledNeighbor > 0) {
// keep
if (closeGaps) {
// ink
pix->setInk(closeColorStyle);
pix->setPaint(fillIndex);
pix->setTone(0);
} else {
// paint
pix->setInk(GAP_CLOSE_USED);
pix->setPaint(fillIndex);
pix->setTone(255);
gapLinePixels.push(TPoint(j, i));
}
// Print out the neighbors of kept gap close pixels, for testing
// purposes
// TSystem::outputDebug("i:"+ std::to_string(i)+", j:"+
// std::to_string(j)+", filledNeighbor:" +
// std::to_string(filledNeighbor) + ", unfilledNeighbor:" +
// std::to_string(unfilledNeighbor));
//// north
// if (i < rin->getLy() - 1){
// TSystem::outputDebug("North, r:" + std::to_string((pix +
// rin->getWrap())->getInk()) + "." + std::to_string((pix +
// rin->getWrap())->getPaint()) + "." + std::to_string((pix +
// rin->getWrap())->getTone())
// + ", combined:" + std::to_string((pixc +
// myCombined->getWrap())->getInk()) + "." + std::to_string((pixc +
// myCombined->getWrap())->getPaint()) + "." + std::to_string((pixc +
// myCombined->getWrap())->getTone())
// );
//}
//// south
// if (i > 0) {
// TSystem::outputDebug("South, r:" + std::to_string((pix -
// rin->getWrap())->getInk()) + "." + std::to_string((pix -
// rin->getWrap())->getPaint()) + "." + std::to_string((pix -
// rin->getWrap())->getTone())
// + ", combined:" + std::to_string((pixc -
// myCombined->getWrap())->getInk()) + "." + std::to_string((pixc -
// myCombined->getWrap())->getPaint()) + "." + std::to_string((pixc
// - myCombined->getWrap())->getTone())
// );
//}
//// east
// if (j < rin->getLx() - 1){
// TSystem::outputDebug("East, r:" + std::to_string((pix +
// 1)->getInk()) + "." + std::to_string((pix + 1)->getPaint()) + "."
// + std::to_string((pix + 1)->getTone())
// + ", combined:" + std::to_string((pixc + 1)->getInk()) + "." +
// std::to_string((pixc + 1)->getPaint()) + "." +
// std::to_string((pixc + 1)->getTone())
// );
//}
//// west
// if (j > 0) {
// TSystem::outputDebug("West, r:" + std::to_string((pix -
// 1)->getInk()) + "." + std::to_string((pix - 1)->getPaint()) + "."
// + std::to_string((pix - 1)->getTone())
// + ", combined:" + std::to_string((pixc - 1)->getInk()) + "." +
// std::to_string((pixc - 1)->getPaint()) + "." +
// std::to_string((pixc - 1)->getTone())
// );
//}
} else {
// paint
pix->setInk(GAP_CLOSE_USED);
pix->setPaint(fillIndex);
pix->setTone(255);
gapLinePixels.push(TPoint(j, i));
}
} else {
// ignore
pix->setInk(IGNORECOLORSTYLE);
pix->setPaint(0);
pix->setTone(0);
}
}
}
// process all the GAP_CLOSE_USED ink values.
TPixelCM32 *pixels = (TPixelCM32 *)r->getRawData();
while (!gapLinePixels.empty()) {
p = gapLinePixels.top();
gapLinePixels.pop();
TPixelCM32 *pix = pixels + (p.y * r->getWrap() + p.x);
// TSystem::outputDebug("gapLinePixels, p.y:" + std::to_string(p.y) + ",
// p.x:" + std::to_string(p.x) + ", getInk():" +
// std::to_string(pix->getInk()));
pix->setInk(0);
}
rin->unlock();
}
//=============================================================================

View file

@ -2,6 +2,7 @@
// TnzCore includes
#include "tfilepath.h"
#include "tenv.h"
// TnzLib includes
#include "toonz/txshsimplelevel.h"
@ -54,6 +55,16 @@ double inline getIncrement(int paperThickness) {
// OnionSkinMask implementation
//***************************************************************************
TEnv::IntVar WholeScene("OnionSkinWholeScene", 0);
TEnv::IntVar EveryFrame("OnionSkinEveryFrame", 1);
OnionSkinMask::OnionSkinMask() {
m_enabled = false;
m_wholeScene = WholeScene;
m_everyFrame = EveryFrame;
m_LightTableStatus = false;
}
void OnionSkinMask::clear() {
m_fos.clear();
m_mos.clear();
@ -155,6 +166,20 @@ bool OnionSkinMask::getMosRange(int &drow0, int &drow1) const {
//-------------------------------------------------------------------
void OnionSkinMask::setIsWholeScene(bool wholeScene) {
m_wholeScene = wholeScene;
WholeScene = (int)m_wholeScene;
}
//-------------------------------------------------------------------
void OnionSkinMask::setIsEveryFrame(bool everyFrame) {
m_everyFrame = everyFrame;
EveryFrame = (int)m_everyFrame;
}
//-------------------------------------------------------------------
double OnionSkinMask::getOnionSkinFade(int rowsDistance) {
if (rowsDistance == 0) return 0.9;

View file

@ -587,7 +587,7 @@ void Preferences::definePreferenceItems() {
"inputCellsWithoutDoubleClickingEnabled", QMetaType::Bool, false);
define(shortcutCommandsWhileRenamingCellEnabled,
"shortcutCommandsWhileRenamingCellEnabled", QMetaType::Bool, false);
define(showQuickToolbar, "showQuickToolbar", QMetaType::Bool, false);
define(showQuickToolbar, "showQuickToolbar", QMetaType::Bool, true);
define(showXsheetBreadcrumbs, "showXsheetBreadcrumbs", QMetaType::Bool,
false);
define(expandFunctionHeader, "expandFunctionHeader", QMetaType::Bool, false);

View file

@ -1586,5 +1586,15 @@ DVAPI TFxP buildSceneFx(ToonzScene *scene, double frame, TXsheet *xsh,
if (!aff.isIdentity()) fx = TFxUtil::makeAffine(fx, aff);
// this creates an over fx to lay the Scene Overlay, if there is one, over the
// current frame
TLevelColumnFx *overlayFx = scene->getOverlayFx(frame);
if (overlayFx) {
PlacedFx overlayPf = builder.makePF(overlayFx);
TFxP overlayAffine = TFxUtil::makeAffine(overlayPf.makeFx(), aff);
fx = TFxUtil::makeOver(fx, overlayAffine);
}
return fx;
}

View file

@ -258,7 +258,8 @@ void TSceneProperties::saveData(TOStream &os) const {
if (rs.m_colorSpaceGamma >= 1. &&
!areAlmostEqual(rs.m_colorSpaceGamma, 2.2))
os.child("colorSpaceGamma") << rs.m_colorSpaceGamma;
if (i == 1) // preview
// Only save syncColorSetting if not the default value
if (i == 1 && !out.isColorSettingsSynced()) // preview
os.child("syncColorSettings") << (out.isColorSettingsSynced() ? 1 : 0);
os.child("multimedia") << out.getMultimediaRendering();

View file

@ -633,7 +633,7 @@ void StageBuilder::addCellWithOnionSkin(PlayerSet &players, ToonzScene *scene,
#ifdef NUOVO_ONION
m_onionSkinDistance = rows[i] - row;
#else
if (!Preferences::instance()->isAnimationSheetEnabled() ||
if (m_onionSkinMask.isEveryFrame() ||
!alreadyAdded(xsh, row, i, rows, col)) {
m_onionSkinDistance = (rows[i] - row) < 0 ? --backPos : ++frontPos;
addCell(players, scene, xsh, rows[i], col, level, subSheetColIndex);