diff --git a/appveyor.yml b/appveyor.yml index e76b02a..b418526 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,11 +32,12 @@ build: verbosity: minimal after_build: - cmd: >- - C:\Qt\5.6\msvc2013_64\bin\windeployqt.exe %CONFIGURATION%\OpenToonz_1.0.exe + C:\Qt\5.6\msvc2013_64\bin\windeployqt.exe %CONFIGURATION%\OpenToonz_1.1.exe copy /Y ..\..\thirdparty\glut\3.7.6\lib\glut64.dll %CONFIGURATION% copy /Y ..\..\thirdparty\glew\glew-1.9.0\bin\64bit\glew32.dll %CONFIGURATION% artifacts: - path: toonz\$(PLATFORM)\$(CONFIGURATION) - name: OpenToonz_1.0 \ No newline at end of file + name: OpenToonz_1.1 + diff --git a/stuff/profiles/layouts/rooms/Default/menubar_template.xml b/stuff/profiles/layouts/rooms/Default/menubar_template.xml index c078576..4fe09af 100644 --- a/stuff/profiles/layouts/rooms/Default/menubar_template.xml +++ b/stuff/profiles/layouts/rooms/Default/menubar_template.xml @@ -84,6 +84,8 @@ MI_CleanupPreview MI_CameraTest MI_Cleanup + + MI_PencilTest MI_AddFrames diff --git a/stuff/profiles/layouts/rooms/Default/room1.ini b/stuff/profiles/layouts/rooms/Default/room1.ini index 0089f65..8abbfaa 100644 --- a/stuff/profiles/layouts/rooms/Default/room1.ini +++ b/stuff/profiles/layouts/rooms/Default/room1.ini @@ -1,18 +1,20 @@ [room] -hierarchy="-1 0 [ [ [ 5 [ 6 4 ] ] 2 ] [ 1 3 ] 0 ] " pane_0\name=Xsheet -name=Basics -pane_0\geometry=@Rect(1667 0 253 996) +pane_0\geometry=@Rect(1518 34 402 962) pane_1\name=FilmStrip -pane_1\geometry=@Rect(1254 0 405 530) +pane_1\geometry=@Rect(1168 34 342 514) pane_2\name=LevelPalette -pane_2\geometry=@Rect(0 808 1246 188) +pane_2\geometry=@Rect(421 706 739 290) +pane_2\viewtype=0 pane_3\name=StyleEditor -pane_3\geometry=@Rect(1254 538 405 458) +pane_3\geometry=@Rect(1168 556 342 440) pane_4\name=SceneViewer -pane_4\geometry=@Rect(43 34 1203 766) -pane_2\viewtype=0 +pane_4\geometry=@Rect(43 34 1117 664) pane_5\name=ToolBar -pane_5\geometry=@Rect(0 0 35 800) +pane_5\geometry=@Rect(0 34 35 962) pane_6\name=ToolOptions -pane_6\geometry=@Rect(43 0 1203 26) +pane_6\geometry=@Rect(0 0 1920 26) +pane_7\name=StudioPalette +pane_7\geometry=@Rect(43 706 370 290) +hierarchy="-1 1 [ 6 [ 5 [ 4 [ 7 2 ] ] [ 1 3 ] 0 ] ] " +name=Basics diff --git a/stuff/profiles/layouts/rooms/Default/room2.ini b/stuff/profiles/layouts/rooms/Default/room2.ini index f927586..f70a529 100644 --- a/stuff/profiles/layouts/rooms/Default/room2.ini +++ b/stuff/profiles/layouts/rooms/Default/room2.ini @@ -1,11 +1,13 @@ [room] -pane_0\name=ComboViewer -pane_0\geometry=@Rect(0 0 1075 558) -pane_1\name=CleanupSettings -pane_1\geometry=@Rect(1083 0 455 857) -pane_2\name=Xsheet -pane_2\geometry=@Rect(0 600 1075 257) -hierarchy="-1 0 [ [ 0 3 2 ] 1 ] " -pane_3\name=ToolOptions +pane_0\name=CleanupSettings +pane_0\geometry=@Rect(1278 34 642 962) +pane_1\name=ToolOptions +pane_1\geometry=@Rect(0 0 1920 26) +pane_2\name=SceneViewer +pane_2\geometry=@Rect(43 34 1227 567) +pane_3\name=ToolBar +pane_3\geometry=@Rect(0 34 35 962) +pane_4\name=Xsheet +pane_4\geometry=@Rect(43 609 1227 387) +hierarchy="-1 1 [ 1 [ 3 [ 2 4 ] 0 ] ] " name=Cleanup -pane_3\geometry=@Rect(0 566 1075 26) diff --git a/stuff/profiles/layouts/rooms/Default/room3.ini b/stuff/profiles/layouts/rooms/Default/room3.ini index 521c253..93fd5b2 100644 --- a/stuff/profiles/layouts/rooms/Default/room3.ini +++ b/stuff/profiles/layouts/rooms/Default/room3.ini @@ -1,16 +1,16 @@ [room] pane_0\name=SceneViewer -pane_0\geometry=@Rect(43 34 984 823) +pane_0\geometry=@Rect(43 34 1080 962) pane_1\name=ToolBar -pane_1\geometry=@Rect(0 0 35 857) +pane_1\geometry=@Rect(0 34 35 962) pane_2\name=FilmStrip -pane_2\geometry=@Rect(1344 0 194 857) +pane_2\geometry=@Rect(1537 34 383 962) pane_3\name=ToolOptions -pane_3\geometry=@Rect(43 0 1293 26) +pane_3\geometry=@Rect(0 0 1920 26) pane_4\name=LevelPalette -pane_4\geometry=@Rect(1035 34 301 147) +pane_4\geometry=@Rect(1131 34 398 217) pane_4\viewtype=0 pane_5\name=StyleEditor -pane_5\geometry=@Rect(1035 189 301 668) -hierarchy="-1 0 [ 1 [ 3 [ 0 [ 4 5 ] ] ] 2 ] " +pane_5\geometry=@Rect(1131 259 398 737) +hierarchy="-1 1 [ 3 [ 1 0 [ 4 5 ] 2 ] ] " name=Drawing diff --git a/stuff/profiles/layouts/rooms/Default/room4.ini b/stuff/profiles/layouts/rooms/Default/room4.ini index 170d35d..3e3603b 100644 --- a/stuff/profiles/layouts/rooms/Default/room4.ini +++ b/stuff/profiles/layouts/rooms/Default/room4.ini @@ -1,18 +1,18 @@ [room] pane_0\name=SceneViewer -pane_0\geometry=@Rect(43 34 904 487) +pane_0\geometry=@Rect(43 34 1095 557) pane_1\name=ToolBar -pane_1\geometry=@Rect(0 0 35 857) +pane_1\geometry=@Rect(0 34 35 962) pane_2\name=ToolOptions -pane_2\geometry=@Rect(43 0 904 26) +pane_2\geometry=@Rect(0 0 1920 26) pane_3\name=Xsheet -pane_3\geometry=@Rect(955 0 384 522) +pane_3\geometry=@Rect(1146 34 480 578) pane_4\name=FunctionEditor -pane_4\geometry=@Rect(43 529 904 328) +pane_4\geometry=@Rect(43 599 1095 397) pane_5\name=Schematic -pane_5\geometry=@Rect(955 530 583 327) -hierarchy="-1 0 [ 1 [ 2 0 4 ] [ [ 3 6 ] 5 ] ] " -name=Animation +pane_5\geometry=@Rect(1146 620 774 376) pane_5\viewtype=1 pane_6\name=FilmStrip -pane_6\geometry=@Rect(1347 0 191 522) +pane_6\geometry=@Rect(1634 34 286 578) +hierarchy="-1 1 [ 2 [ 1 [ 0 4 ] [ [ 3 6 ] 5 ] ] ] " +name=Animation diff --git a/stuff/profiles/layouts/rooms/Default/room5.ini b/stuff/profiles/layouts/rooms/Default/room5.ini index 56dd4a7..2b25991 100644 --- a/stuff/profiles/layouts/rooms/Default/room5.ini +++ b/stuff/profiles/layouts/rooms/Default/room5.ini @@ -1,20 +1,20 @@ [room] pane_0\name=SceneViewer -pane_0\geometry=@Rect(43 34 990 534) +pane_0\geometry=@Rect(43 34 1181 604) pane_1\name=ToolBar -pane_1\geometry=@Rect(0 0 35 857) +pane_1\geometry=@Rect(0 34 35 962) pane_2\name=ToolOptions -pane_2\geometry=@Rect(43 0 1495 26) +pane_2\geometry=@Rect(0 0 1920 26) pane_3\name=ColorModel -pane_3\geometry=@Rect(1041 34 245 228) +pane_3\geometry=@Rect(1232 34 341 278) pane_4\name=Xsheet -pane_4\geometry=@Rect(43 576 990 281) +pane_4\geometry=@Rect(43 646 1181 350) pane_5\name=LevelPalette -pane_5\geometry=@Rect(1041 270 497 87) +pane_5\geometry=@Rect(1232 320 688 130) pane_5\viewtype=0 pane_6\name=StyleEditor -pane_6\geometry=@Rect(1041 365 497 492) +pane_6\geometry=@Rect(1232 458 688 538) pane_7\name=StudioPalette -pane_7\geometry=@Rect(1294 34 244 228) -hierarchy="-1 0 [ 1 [ 2 [ [ 0 4 ] [ [ 3 7 ] 5 6 ] ] ] ] " -name=Pltedit +pane_7\geometry=@Rect(1581 34 339 278) +hierarchy="-1 1 [ 2 [ 1 [ 0 4 ] [ [ 3 7 ] 5 6 ] ] ] " +name=Palette diff --git a/stuff/profiles/layouts/rooms/Default/room6.ini b/stuff/profiles/layouts/rooms/Default/room6.ini index 582fbad..140070d 100644 --- a/stuff/profiles/layouts/rooms/Default/room6.ini +++ b/stuff/profiles/layouts/rooms/Default/room6.ini @@ -1,9 +1,9 @@ [room] pane_0\name=Xsheet -pane_0\geometry=@Rect(0 0 913 857) +pane_0\geometry=@Rect(0 0 1104 996) pane_1\name=FunctionEditor -pane_1\geometry=@Rect(921 417 617 440) +pane_1\geometry=@Rect(1112 487 808 509) +pane_2\name=SceneViewer +pane_2\geometry=@Rect(1112 0 808 479) hierarchy="-1 0 [ 0 [ 2 1 ] ] " name=Xsheet -pane_2\name=SceneViewer -pane_2\geometry=@Rect(921 0 617 409) diff --git a/stuff/profiles/layouts/rooms/Default/room7.ini b/stuff/profiles/layouts/rooms/Default/room7.ini index 43f4a25..b2759ed 100644 --- a/stuff/profiles/layouts/rooms/Default/room7.ini +++ b/stuff/profiles/layouts/rooms/Default/room7.ini @@ -1,7 +1,7 @@ [room] pane_0\name=Browser -pane_0\geometry=@Rect(0 0 1538 425) +pane_0\geometry=@Rect(0 0 1920 495) pane_1\name=SceneCast -pane_1\geometry=@Rect(0 433 1538 424) +pane_1\geometry=@Rect(0 503 1920 493) hierarchy="-1 1 [ 0 1 ] " name=Browser diff --git a/stuff/profiles/layouts/rooms/Default/room8.ini b/stuff/profiles/layouts/rooms/Default/room8.ini index 62fadef..b3c7f6c 100644 --- a/stuff/profiles/layouts/rooms/Default/room8.ini +++ b/stuff/profiles/layouts/rooms/Default/room8.ini @@ -1,7 +1,7 @@ [room] pane_0\name=Tasks -pane_0\geometry=@Rect(0 0 765 857) +pane_0\geometry=@Rect(0 0 956 996) pane_1\name=BatchServers -pane_1\geometry=@Rect(773 0 765 857) +pane_1\geometry=@Rect(964 0 956 996) hierarchy="-1 0 [ 0 1 ] " name=Farm diff --git a/stuff/projects/cleanupreslist.txt b/stuff/projects/cleanupreslist.txt index e59a3a2..8326b0c 100644 --- a/stuff/projects/cleanupreslist.txt +++ b/stuff/projects/cleanupreslist.txt @@ -1,3 +1,11 @@ +UHD 4K, 3840x2160, 16/9 + +HD 1080, 1920x1080, 16/9 + +HD 720, 1280x720, 16/9 + +HD 480, 853x480, 16/9 + PAL analog, 768x576, 4/3 PAL digital, 720x576, 4/3 @@ -10,12 +18,6 @@ NTSC analog, 648x486, 4/3 NTSC 16/9, 864x486, 16/9 -HD 1080, 1920x1080, 16/9 - -HD 720, 1280x720, 16/9 - -HD 480, 853x480, 16/9 - Academy Full Frame1 1K, 914x666, 1.37 Academy Full Frame2 1K, 1024x746, 1.37 @@ -88,4 +90,6 @@ Anamorphic Un-squeezed 2K, 1828x778, 2.35 Anamorphic Un-squeezed 4K, 3656x1556, 2.35 +DCI 2K, 2048x1080, 256/135 +DCI 4K, 4096x2160, 256/135 diff --git a/stuff/projects/reslist.txt b/stuff/projects/reslist.txt index 79c5b48..8326b0c 100644 --- a/stuff/projects/reslist.txt +++ b/stuff/projects/reslist.txt @@ -1,3 +1,11 @@ +UHD 4K, 3840x2160, 16/9 + +HD 1080, 1920x1080, 16/9 + +HD 720, 1280x720, 16/9 + +HD 480, 853x480, 16/9 + PAL analog, 768x576, 4/3 PAL digital, 720x576, 4/3 @@ -10,12 +18,6 @@ NTSC analog, 648x486, 4/3 NTSC 16/9, 864x486, 16/9 -HD 1080, 1920x1080, 16/9 - -HD 720, 1280x720, 16/9 - -HD 480, 853x480, 16/9 - Academy Full Frame1 1K, 914x666, 1.37 Academy Full Frame2 1K, 1024x746, 1.37 diff --git a/toonz/install/SystemVar.ini b/toonz/install/SystemVar.ini index 7480cf4..a843174 100644 --- a/toonz/install/SystemVar.ini +++ b/toonz/install/SystemVar.ini @@ -1,11 +1,11 @@ [General] -TOONZCACHEROOT="/Applications/OpenToonz/OpenToonz_1.0_stuff/cache" -TOONZCONFIG="/Applications/OpenToonz/OpenToonz_1.0_stuff/config" -TOONZFXPRESETS="/Applications/OpenToonz/OpenToonz_1.0_stuff/fxs" -TOONZLIBRARY="/Applications/OpenToonz/OpenToonz_1.0_stuff/library" -TOONZPROFILES="/Applications/OpenToonz/OpenToonz_1.0_stuff/profiles" -OpenToonzPROFILES="/Applications/OpenToonz/OpenToonz_1.0_stuff/profiles" -TOONZPROJECTS="/Applications/OpenToonz/OpenToonz_1.0_stuff/projects" -TOONZROOT="/Applications/OpenToonz/OpenToonz_1.0_stuff" -OPENTOONZROOT="/Applications/OpenToonz/OpenToonz_1.0_stuff" -TOONZSTUDIOPALETTE="/Applications/OpenToonz/OpenToonz_1.0_stuff/projects/studiopalette" +TOONZCACHEROOT="/Applications/OpenToonz/OpenToonz_1.1_stuff/cache" +TOONZCONFIG="/Applications/OpenToonz/OpenToonz_1.1_stuff/config" +TOONZFXPRESETS="/Applications/OpenToonz/OpenToonz_1.1_stuff/fxs" +TOONZLIBRARY="/Applications/OpenToonz/OpenToonz_1.1_stuff/library" +TOONZPROFILES="/Applications/OpenToonz/OpenToonz_1.1_stuff/profiles" +OpenToonzPROFILES="/Applications/OpenToonz/OpenToonz_1.1_stuff/profiles" +TOONZPROJECTS="/Applications/OpenToonz/OpenToonz_1.1_stuff/projects" +TOONZROOT="/Applications/OpenToonz/OpenToonz_1.1_stuff" +OPENTOONZROOT="/Applications/OpenToonz/OpenToonz_1.1_stuff" +TOONZSTUDIOPALETTE="/Applications/OpenToonz/OpenToonz_1.1_stuff/projects/studiopalette" diff --git a/toonz/sources/colorfx/strokestyles.cpp b/toonz/sources/colorfx/strokestyles.cpp index abed1f2..29d1e9e 100644 --- a/toonz/sources/colorfx/strokestyles.cpp +++ b/toonz/sources/colorfx/strokestyles.cpp @@ -5486,7 +5486,8 @@ TColorStyle::ParamType TLongBlendStrokeStyle2::getParamType(int index) const { QString TLongBlendStrokeStyle2::getParamNames(int index) const { assert(0 <= index && index < 1); - return QCoreApplication::translate("TLongBlendStrokeStyle2", "Distance"); // W_Watercolor_Distance + return QCoreApplication::translate("TLongBlendStrokeStyle2", + "Distance"); // W_Watercolor_Distance } //----------------------------------------------------------------------------- diff --git a/toonz/sources/common/tapptools/tcli.cpp b/toonz/sources/common/tapptools/tcli.cpp index 652a9f8..3f5f2da 100644 --- a/toonz/sources/common/tapptools/tcli.cpp +++ b/toonz/sources/common/tapptools/tcli.cpp @@ -744,7 +744,8 @@ void RangeQualifier::fetch(int index, int &argc, char *argv[]) { } } -static std::ostream &operator<<(std::ostream &out, const RangeQualifier &range) { +static std::ostream &operator<<(std::ostream &out, + const RangeQualifier &range) { return out << "[" << range.getFrom() << ", " << range.getTo() << "]"; } diff --git a/toonz/sources/common/tapptools/tcolorutils.cpp b/toonz/sources/common/tapptools/tcolorutils.cpp index 71ed04c..d18f22b 100644 --- a/toonz/sources/common/tapptools/tcolorutils.cpp +++ b/toonz/sources/common/tapptools/tcolorutils.cpp @@ -738,7 +738,8 @@ void Cluster::getMeanAxis(KEYER_FLOAT axis[3]) { //#define METODO_USATO_SU_TOONZ46 static void buildPaletteForBlendedImages(std::set &palette, - const TRaster32P &raster, int maxColorCount) { + const TRaster32P &raster, + int maxColorCount) { int lx = raster->getLx(); int ly = raster->getLy(); diff --git a/toonz/sources/common/tcontenthistory.cpp b/toonz/sources/common/tcontenthistory.cpp index 8f157fb..0c339e7 100644 --- a/toonz/sources/common/tcontenthistory.cpp +++ b/toonz/sources/common/tcontenthistory.cpp @@ -84,7 +84,7 @@ inline QString getStr(const TFrameId &id) { const QString Fmt = "dd MMM yy hh:mm"; static QString getLine(int counter, const QDateTime &date, - const set &frames) { + const set &frames) { static QString user; static QString machine; if (user == "") { diff --git a/toonz/sources/common/tfx/trenderer.cpp b/toonz/sources/common/tfx/trenderer.cpp index afe6f30..1e1c9b6 100644 --- a/toonz/sources/common/tfx/trenderer.cpp +++ b/toonz/sources/common/tfx/trenderer.cpp @@ -1107,7 +1107,7 @@ void RenderTask::onFinished(TThread::RunnableP) { // Update the render instance status bool instanceExpires = false; - bool isCanceled = false; + bool isCanceled = false; { QMutexLocker sl(&rendererImp->m_renderInstancesMutex); std::map::iterator it = @@ -1116,7 +1116,7 @@ void RenderTask::onFinished(TThread::RunnableP) { if (it != rendererImp->m_activeInstances.end() && (--it->second.m_activeTasks) <= 0) { instanceExpires = true; - isCanceled = (m_info.m_isCanceled && *m_info.m_isCanceled); + isCanceled = (m_info.m_isCanceled && *m_info.m_isCanceled); rendererImp->m_activeInstances.erase(m_renderId); // m_info is freed, don't access further! } diff --git a/toonz/sources/common/tiio/tiio_std.cpp b/toonz/sources/common/tiio/tiio_std.cpp index 50c5273..3221abe 100644 --- a/toonz/sources/common/tiio/tiio_std.cpp +++ b/toonz/sources/common/tiio/tiio_std.cpp @@ -15,6 +15,9 @@ void Tiio::defineStd() { declare("jpg", TFileType::RASTER_IMAGE); defineWriterProperties("jpg", new JpgWriterProperties()); + defineReaderMaker("jpeg", Tiio::makeJpgReader); + declare("jpeg", TFileType::RASTER_IMAGE); + defineReaderMaker("bmp", Tiio::makeBmpReader); defineWriterMaker("bmp", Tiio::makeBmpWriter, true); declare("bmp", TFileType::RASTER_IMAGE); diff --git a/toonz/sources/common/trop/quickput.cpp b/toonz/sources/common/trop/quickput.cpp index 92b3db6..d06b4de 100644 --- a/toonz/sources/common/trop/quickput.cpp +++ b/toonz/sources/common/trop/quickput.cpp @@ -4277,20 +4277,19 @@ void quickPut(const TRasterP &dn, const TRasterP &up, const TAffine &aff, else doQuickPutNoFilter(dn32, up8, aff, colorScale); } else if (dn32 && up32) { - if (areAlmostEqual(aff.a12, 0) && areAlmostEqual(aff.a21, 0)){ + if (areAlmostEqual(aff.a12, 0) && areAlmostEqual(aff.a21, 0)) { if (bilinear) doQuickPutFilter(dn32, up32, aff.a11, aff.a22, aff.a13, aff.a23); else { doQuickPutNoFilter(dn32, up32, aff.a11, aff.a22, aff.a13, aff.a23, - colorScale, doPremultiply, whiteTransp, firstColumn, - doRasterDarkenBlendedView); + colorScale, doPremultiply, whiteTransp, firstColumn, + doRasterDarkenBlendedView); } - } - else if (bilinear) + } else if (bilinear) doQuickPutFilter(dn32, up32, aff); else { doQuickPutNoFilter(dn32, up32, aff, colorScale, doPremultiply, - whiteTransp, firstColumn, doRasterDarkenBlendedView); + whiteTransp, firstColumn, doRasterDarkenBlendedView); } } else if (dn32 && up64) doQuickPutNoFilter(dn32, up64, aff, doPremultiply, firstColumn); diff --git a/toonz/sources/common/trop/tover.cpp b/toonz/sources/common/trop/tover.cpp index aa67fe1..208919e 100644 --- a/toonz/sources/common/trop/tover.cpp +++ b/toonz/sources/common/trop/tover.cpp @@ -250,7 +250,8 @@ void do_over(TRasterGR8P rout, const TRaster32P &rup) { //----------------------------------------------------------------------------- -static void do_over(TRaster32P rout, const TRasterGR8P &rup, const TPixel32 &color) { +static void do_over(TRaster32P rout, const TRasterGR8P &rup, + const TPixel32 &color) { assert(rout->getSize() == rup->getSize()); for (int y = rout->getLy(); --y >= 0;) { TPixel32 *out_pix = rout->pixels(y); diff --git a/toonz/sources/common/trop/tropcm.cpp b/toonz/sources/common/trop/tropcm.cpp index fc7ac2d..e9374a7 100644 --- a/toonz/sources/common/trop/tropcm.cpp +++ b/toonz/sources/common/trop/tropcm.cpp @@ -212,8 +212,9 @@ paints[i] = TPixelFloat(paints2[i]); //----------------------------------------------------------------------------------------------- -static void do_convert(const TTile &dst, const TTile &src, const TPaletteP palette, - bool transparencyCheck, bool applyFx) { +static void do_convert(const TTile &dst, const TTile &src, + const TPaletteP palette, bool transparencyCheck, + bool applyFx) { // assert(palette); // assert(_rasOut && _rasIn); // assert(rasOut->getSize() == rasIn->getSize()); diff --git a/toonz/sources/common/tsystem/tsystem.cpp b/toonz/sources/common/tsystem/tsystem.cpp index 20d11d7..9713d1e 100644 --- a/toonz/sources/common/tsystem/tsystem.cpp +++ b/toonz/sources/common/tsystem/tsystem.cpp @@ -416,7 +416,7 @@ public: const wstring a_str = a.getWideString(); const wstring b_str = b.getWideString(); - unsigned int i = 0; + unsigned int i = 0; int case_compare = -1; while (a_str[i] || b_str[i]) { if (a_str[i] != b_str[i]) { diff --git a/toonz/sources/common/tvectorimage/tcomputeregions.cpp b/toonz/sources/common/tvectorimage/tcomputeregions.cpp index ceced07..dee9fc5 100644 --- a/toonz/sources/common/tvectorimage/tcomputeregions.cpp +++ b/toonz/sources/common/tvectorimage/tcomputeregions.cpp @@ -436,7 +436,8 @@ static void cleanIntersectionMarks(const VIList &interList) { //----------------------------------------------------------------------------- -static void cleanNextIntersection(const VIList &interList, TStroke *s) { +static void cleanNextIntersection(const VIList &interList, + TStroke *s) { Intersection *p; IntersectedStroke *q; @@ -1080,8 +1081,8 @@ static double getAngle(const TPointD &p0, const TPointD &p1) { //----------------------------------------------------------------------------- // nel caso l'angolo tra due stroke in un certo w sia nullo, // si va un po' avanti per vedere come sono orientate.... -static double getNearAngle(const TStroke *s1, double w1, bool out1, const TStroke *s2, - double w2, bool out2) { +static double getNearAngle(const TStroke *s1, double w1, bool out1, + const TStroke *s2, double w2, bool out2) { bool verse1 = (out1 && w1 < 1) || (!out1 && w1 == 0); bool verse2 = (out2 && w2 < 1) || (!out2 && w2 == 0); double ltot1 = s1->getLength(); @@ -1106,7 +1107,8 @@ static double getNearAngle(const TStroke *s1, double w1, bool out1, const TStrok //----------------------------------------------------------------------------- -static bool makeEdgeIntersection(Intersection &interList, IntersectedStroke &item1, +static bool makeEdgeIntersection(Intersection &interList, + IntersectedStroke &item1, IntersectedStroke &item2, const TPointD &p1a, const TPointD &p1b, const TPointD &p2a, const TPointD &p2b) { @@ -1216,8 +1218,9 @@ static bool makeEdgeIntersection(Intersection &interList, IntersectedStroke &ite //----------------------------------------------------------------------------- -static bool makeIntersection(IntersectionData &intData, const vector &s, - int ii, int jj, DoublePair inter, int strokeSize, +static bool makeIntersection(IntersectionData &intData, + const vector &s, int ii, int jj, + DoublePair inter, int strokeSize, Intersection &interList) { IntersectedStroke item1, item2; @@ -1337,9 +1340,10 @@ areAlmostEqual(q->getP2(), p->getP0(), 1e-2)) */ //----------------------------------------------------------------------------- -static bool addAutocloseIntersection(IntersectionData &intData, vector &s, - int ii, int jj, double w0, double w1, - int strokeSize, bool isVectorized) { +static bool addAutocloseIntersection(IntersectionData &intData, + vector &s, int ii, int jj, + double w0, double w1, int strokeSize, + bool isVectorized) { assert(s[ii]->m_groupId == s[jj]->m_groupId); Intersection *rp = intData.m_intList.last(); @@ -1419,8 +1423,8 @@ static bool addAutocloseIntersection(IntersectionData &intData, vectorgetThickPoint(w0); @@ -1496,9 +1500,10 @@ return false; */ //----------------------------------------------------------------------------- -static double getCurlW(TStroke *s, bool isBegin) // trova il punto di split su una - // stroke, in prossimita di un - // ricciolo; +static double getCurlW(TStroke *s, + bool isBegin) // trova il punto di split su una + // stroke, in prossimita di un + // ricciolo; // un ricciolo c'e' se la curva ha un min o max relativo su x seguito da uno su // y, o viceversa. { @@ -1571,8 +1576,8 @@ return -1; #endif //----------------------------------------------------------------------------- -static bool isCloseEnoughP2L(double facMin, double facMax, TStroke *s1, double w1, - TStroke *s2, double &w) { +static bool isCloseEnoughP2L(double facMin, double facMax, TStroke *s1, + double w1, TStroke *s2, double &w) { if (s1->isSelfLoop()) return false; TThickPoint p0 = s1->getThickPoint(w1); @@ -1883,8 +1888,8 @@ void getClosingPoints(const TRectD &rect, double fac, const TVectorImageP &vi, static void autoclose(double factor, vector &s, int ii, int jj, IntersectionData &IntData, int strokeSize, - TL2LAutocloser &l2lautocloser, vector *intersections, - bool isVectorized) { + TL2LAutocloser &l2lautocloser, + vector *intersections, bool isVectorized) { vector> segments; getClosingSegments(l2lautocloser, 0, factor, s[ii]->m_s, s[jj]->m_s, intersections, segments); @@ -1939,9 +1944,10 @@ TPointD inline getTangent(const IntersectedStroke &item) { //----------------------------------------------------------------------------- -static void addBranch(IntersectionData &intData, VIList &strokeList, - const vector &s, int ii, double w, int strokeSize, - bool gettingOut) { +static void addBranch(IntersectionData &intData, + VIList &strokeList, + const vector &s, int ii, double w, + int strokeSize, bool gettingOut) { IntersectedStroke *p1, *p2; TPointD tanRef, lastTan; @@ -2128,9 +2134,10 @@ IntersectedStroke app; //----------------------------------------------------------------------------- -static void addIntersections(IntersectionData &intData, const vector &s, - int ii, int jj, vector &intersections, - int strokeSize, bool isVectorized) { +static void addIntersections(IntersectionData &intData, + const vector &s, int ii, int jj, + vector &intersections, int strokeSize, + bool isVectorized) { for (int k = 0; k < (int)intersections.size(); k++) { if (ii >= strokeSize && (areAlmostEqual(intersections[k].first, 0.0) || areAlmostEqual(intersections[k].first, 1.0))) diff --git a/toonz/sources/common/tvectorimage/tregion.cpp b/toonz/sources/common/tvectorimage/tregion.cpp index 42592e5..8c828b1 100644 --- a/toonz/sources/common/tvectorimage/tregion.cpp +++ b/toonz/sources/common/tvectorimage/tregion.cpp @@ -34,7 +34,9 @@ void foo() //============================================================================= -static bool compareEdge(const TEdge &a, const TEdge &b) { return a.m_s == b.m_s; } +static bool compareEdge(const TEdge &a, const TEdge &b) { + return a.m_s == b.m_s; +} //----------------------------------------------------------------------------- diff --git a/toonz/sources/common/tvectorimage/tsweepboundary.cpp b/toonz/sources/common/tvectorimage/tsweepboundary.cpp index 0d4ce93..8bd3bdb 100644 --- a/toonz/sources/common/tvectorimage/tsweepboundary.cpp +++ b/toonz/sources/common/tvectorimage/tsweepboundary.cpp @@ -174,10 +174,9 @@ typedef list QuadraticList; //--------------------------------------------------------------------------- -static void splitCircularArcIntoQuadraticCurves(const TPointD &Center, - const TPointD &Pstart, - const TPointD &Pend, - vector &quadArray) { +static void splitCircularArcIntoQuadraticCurves( + const TPointD &Center, const TPointD &Pstart, const TPointD &Pend, + vector &quadArray) { // It splits a circular anticlockwise arc into a sequence of quadratic bezier // curves // Every quadratic curve can approximate an arc no longer than 45 degrees (or diff --git a/toonz/sources/common/tvectorimage/tvectorimage.cpp b/toonz/sources/common/tvectorimage/tvectorimage.cpp index d8a5877..c70f1b9 100644 --- a/toonz/sources/common/tvectorimage/tvectorimage.cpp +++ b/toonz/sources/common/tvectorimage/tvectorimage.cpp @@ -1939,7 +1939,8 @@ assert(m_strokes[strokeIndex-wSize+1]->m_edgeList.empty());*/ //----------------------------------------------------------------------------- static void computeEdgeList(TStroke *newS, const std::list &edgeList1, - bool join1AtBegin, const std::list &edgeList2, + bool join1AtBegin, + const std::list &edgeList2, bool join2AtBegin, std::list &edgeList) { std::list::const_iterator it; diff --git a/toonz/sources/common/tvrender/tflash.cpp b/toonz/sources/common/tvrender/tflash.cpp index 3205751..fcbe820 100644 --- a/toonz/sources/common/tvrender/tflash.cpp +++ b/toonz/sources/common/tvrender/tflash.cpp @@ -323,7 +323,8 @@ bool PolyStyle::operator<(const PolyStyle &p) const { //------------------------------------------------------------------- -static void computeQuadChain(const TEdge &e, std::vector &quadArray, +static void computeQuadChain(const TEdge &e, + std::vector &quadArray, std::vector &toBeDeleted) { int chunk_b, chunk_e, chunk = -1; double t_b, t_e, w0, w1; diff --git a/toonz/sources/common/tvrender/tinbetween.cpp b/toonz/sources/common/tvrender/tinbetween.cpp index 68b8551..fce82be 100644 --- a/toonz/sources/common/tvrender/tinbetween.cpp +++ b/toonz/sources/common/tvrender/tinbetween.cpp @@ -57,7 +57,8 @@ static double average(std::vector &values, double range = 2.5) { //-------------------------------------------------------------------------------------- static double weightedAverage(std::vector &values, - std::vector &weights, double range = 2.5) { + std::vector &weights, + double range = 2.5) { UINT size = values.size(); if (size == 0) return std::numeric_limits::signaling_NaN(); @@ -181,8 +182,8 @@ static void eraseSmallAngles(std::vector> &corners, // max is tha maximum angle greater or equal to minDegree static void detectCorners(const TStroke *stroke, double minDegree, - std::vector> &corners, double &min, - double &max) { + std::vector> &corners, + double &min, double &max) { const double minSin = fabs(sin(minDegree * M_PI_180)); double angle, vectorialProduct, metaCornerLen, partialLen; diff --git a/toonz/sources/common/tvrender/ttessellator.cpp b/toonz/sources/common/tvrender/ttessellator.cpp index 9dcafa7..ca049d4 100644 --- a/toonz/sources/common/tvrender/ttessellator.cpp +++ b/toonz/sources/common/tvrender/ttessellator.cpp @@ -69,8 +69,8 @@ TThread::Mutex CombineDataGuard; static std::list Combine_data; extern "C" { -static void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4], - GLfloat w[4], GLdouble **dataOut) { +static void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4], GLfloat w[4], + GLdouble **dataOut) { GLdouble *newCoords = new GLdouble[3]; newCoords[0] = coords[0]; diff --git a/toonz/sources/common/twain/twain.h b/toonz/sources/common/twain/twain.h index b2c712c..fc05afc 100644 --- a/toonz/sources/common/twain/twain.h +++ b/toonz/sources/common/twain/twain.h @@ -1484,18 +1484,21 @@ typedef struct { /* misplaced */ #define DAT_ICCPROFILE \ - 0x0401 /* TW_MEMORY Added 1.91 This Data Argument is misplaced but \ \ \ \ + 0x0401 /* TW_MEMORY Added 1.91 This Data Argument is misplaced but \ \ \ \ + \ \ belongs to the DG_IMAGE Data Group */ #define DAT_IMAGEMEMFILEXFER \ 0x0402 /* TW_IMAGEMEMXFER Added 1.91 This Data Argument is misplaced but \ \ \ \ \ \ \ \ \ \ + \ \ \ \ \ belongs to the DG_IMAGE Data Group */ #define DAT_ENTRYPOINT \ 0x0403 /* TW_ENTRYPOINT Added 2.0 This Data Argument is misplaced but \ \ \ \ \ \ \ + \ \ \ \ belongs to the DG_CONTROL Data Group */ /**************************************************************************** diff --git a/toonz/sources/image/ffmpeg/tiio_ffmpeg.cpp b/toonz/sources/image/ffmpeg/tiio_ffmpeg.cpp index 33ac88b..3f35abe 100644 --- a/toonz/sources/image/ffmpeg/tiio_ffmpeg.cpp +++ b/toonz/sources/image/ffmpeg/tiio_ffmpeg.cpp @@ -11,7 +11,7 @@ Ffmpeg::Ffmpeg() { m_ffmpegPath = Preferences::instance()->getFfmpegPath(); - m_ffmpegTimeout = Preferences::instance()->getFfmpegTimeout() * 1000; + m_ffmpegTimeout = Preferences::instance()->getFfmpegTimeout() * 1000; std::string strPath = m_ffmpegPath.toStdString(); m_intermediateFormat = "png"; } @@ -62,27 +62,27 @@ bool Ffmpeg::checkFfprobe() { } bool Ffmpeg::checkFormat(std::string format) { - QString path = Preferences::instance()->getFfmpegPath() + "/ffmpeg"; + QString path = Preferences::instance()->getFfmpegPath() + "/ffmpeg"; #if defined(_WIN32) - path = path + ".exe"; + path = path + ".exe"; #endif - QStringList args; - args << "-formats"; - QProcess ffmpeg; - ffmpeg.start(path, args); - ffmpeg.waitForFinished(); - QString results = ffmpeg.readAllStandardError(); - results += ffmpeg.readAllStandardOutput(); - ffmpeg.close(); - std::string strResults = results.toStdString(); - std::string::size_type n; - n = strResults.find(format); - if (n != std::string::npos) return true; - else return false; + QStringList args; + args << "-formats"; + QProcess ffmpeg; + ffmpeg.start(path, args); + ffmpeg.waitForFinished(); + QString results = ffmpeg.readAllStandardError(); + results += ffmpeg.readAllStandardOutput(); + ffmpeg.close(); + std::string strResults = results.toStdString(); + std::string::size_type n; + n = strResults.find(format); + if (n != std::string::npos) + return true; + else + return false; } - - TFilePath Ffmpeg::getFfmpegCache() { QString cacheRoot = ToonzFolder::getCacheRootFolder().getQString(); if (!TSystem::doesExistFileOrLevel(TFilePath(cacheRoot + "/ffmpeg"))) { diff --git a/toonz/sources/image/ffmpeg/tiio_ffmpeg.h b/toonz/sources/image/ffmpeg/tiio_ffmpeg.h index 24aa93f..4b3fe4f 100644 --- a/toonz/sources/image/ffmpeg/tiio_ffmpeg.h +++ b/toonz/sources/image/ffmpeg/tiio_ffmpeg.h @@ -45,7 +45,7 @@ public: private: QString m_intermediateFormat, m_ffmpegPath, m_audioPath, m_audioFormat; int m_frameCount = 0, m_lx, m_ly, m_bpp, m_bitsPerSample, m_channelCount, - m_ffmpegTimeout = 30000; + m_ffmpegTimeout = 30000; double m_frameRate = 24.0; bool m_ffmpegExists = false, m_ffprobeExists = false, m_hasSoundTrack = false; TFilePath m_path; diff --git a/toonz/sources/image/ffmpeg/tiio_gif.cpp b/toonz/sources/image/ffmpeg/tiio_gif.cpp index 1db30cb..089461d 100644 --- a/toonz/sources/image/ffmpeg/tiio_gif.cpp +++ b/toonz/sources/image/ffmpeg/tiio_gif.cpp @@ -37,9 +37,8 @@ private: TLevelWriterGif::TLevelWriterGif(const TFilePath &path, TPropertyGroup *winfo) : TLevelWriter(path, winfo) { if (!m_properties) m_properties = new Tiio::GifWriterProperties(); - std::string scale = m_properties->getProperty("Scale") - ->getValueAsString(); - m_scale = QString::fromStdString(scale).toInt(); + std::string scale = m_properties->getProperty("Scale")->getValueAsString(); + m_scale = QString::fromStdString(scale).toInt(); TBoolProperty *looping = (TBoolProperty *)m_properties->getProperty("Looping"); m_looping = looping->getValue(); @@ -66,7 +65,7 @@ TLevelWriterGif::~TLevelWriterGif() { // set scaling outLx = m_lx * m_scale / 100; outLy = m_ly * m_scale / 100; - //ffmpeg doesn't like resolutions that aren't divisible by 2. + // ffmpeg doesn't like resolutions that aren't divisible by 2. if (outLx % 2 != 0) outLx++; if (outLy % 2 != 0) outLy++; @@ -97,10 +96,9 @@ TLevelWriterGif::~TLevelWriterGif() { postIArgs << palette; postIArgs << "-lavfi"; postIArgs << paletteFilters; - } - else { - postIArgs << "-lavfi"; - postIArgs << filters; + } else { + postIArgs << "-lavfi"; + postIArgs << filters; } if (!m_looping) { @@ -239,7 +237,7 @@ TImageP TLevelReaderGif::load(int frameIndex) { } Tiio::GifWriterProperties::GifWriterProperties() - : m_scale("Scale", 1, 100, 100) + : m_scale("Scale", 1, 100, 100) , m_looping("Looping", true) , m_palette("Generate Palette", true) { bind(m_scale); diff --git a/toonz/sources/image/ffmpeg/tiio_mp4.cpp b/toonz/sources/image/ffmpeg/tiio_mp4.cpp index 7c136a4..fb7d9a1 100644 --- a/toonz/sources/image/ffmpeg/tiio_mp4.cpp +++ b/toonz/sources/image/ffmpeg/tiio_mp4.cpp @@ -39,8 +39,9 @@ TLevelWriterMp4::TLevelWriterMp4(const TFilePath &path, TPropertyGroup *winfo) : TLevelWriter(path, winfo) { if (!m_properties) m_properties = new Tiio::Mp4WriterProperties(); std::string scale = m_properties->getProperty("Scale")->getValueAsString(); - m_scale = QString::fromStdString(scale).toInt(); - std::string quality = m_properties->getProperty("Quality")->getValueAsString(); + m_scale = QString::fromStdString(scale).toInt(); + std::string quality = + m_properties->getProperty("Quality")->getValueAsString(); m_vidQuality = QString::fromStdString(quality).toInt(); ffmpegWriter = new Ffmpeg(); ffmpegWriter->setPath(m_path); @@ -62,7 +63,7 @@ TLevelWriterMp4::~TLevelWriterMp4() { outLx = m_lx * m_scale / 100; outLy = m_ly * m_scale / 100; } - //ffmpeg doesn't like resolutions that aren't divisible by 2. + // ffmpeg doesn't like resolutions that aren't divisible by 2. if (outLx % 2 != 0) outLx++; if (outLy % 2 != 0) outLy++; @@ -211,7 +212,7 @@ TImageP TLevelReaderMp4::load(int frameIndex) { } Tiio::Mp4WriterProperties::Mp4WriterProperties() - : m_vidQuality("Quality", 1, 100, 90), m_scale("Scale", 1, 100, 100) { + : m_vidQuality("Quality", 1, 100, 90), m_scale("Scale", 1, 100, 100) { bind(m_vidQuality); bind(m_scale); } diff --git a/toonz/sources/image/ffmpeg/tiio_webm.cpp b/toonz/sources/image/ffmpeg/tiio_webm.cpp index cd157e2..0d9e2b2 100644 --- a/toonz/sources/image/ffmpeg/tiio_webm.cpp +++ b/toonz/sources/image/ffmpeg/tiio_webm.cpp @@ -39,8 +39,9 @@ TLevelWriterWebm::TLevelWriterWebm(const TFilePath &path, TPropertyGroup *winfo) : TLevelWriter(path, winfo) { if (!m_properties) m_properties = new Tiio::WebmWriterProperties(); std::string scale = m_properties->getProperty("Scale")->getValueAsString(); - m_scale = QString::fromStdString(scale).toInt(); - std::string quality = m_properties->getProperty("Quality")->getValueAsString(); + m_scale = QString::fromStdString(scale).toInt(); + std::string quality = + m_properties->getProperty("Quality")->getValueAsString(); m_vidQuality = QString::fromStdString(quality).toInt(); ffmpegWriter = new Ffmpeg(); ffmpegWriter->setPath(m_path); @@ -62,7 +63,7 @@ TLevelWriterWebm::~TLevelWriterWebm() { outLx = m_lx * m_scale / 100; outLy = m_ly * m_scale / 100; } - //ffmpeg doesn't like resolutions that aren't divisible by 2. + // ffmpeg doesn't like resolutions that aren't divisible by 2. if (outLx % 2 != 0) outLx++; if (outLy % 2 != 0) outLy++; @@ -215,9 +216,9 @@ TImageP TLevelReaderWebm::load(int frameIndex) { } Tiio::WebmWriterProperties::WebmWriterProperties() - : m_vidQuality("Quality", 1, 100, 90), m_scale("Scale", 1, 100, 100) { - bind(m_vidQuality); - bind(m_scale); + : m_vidQuality("Quality", 1, 100, 90), m_scale("Scale", 1, 100, 100) { + bind(m_vidQuality); + bind(m_scale); } // Tiio::Reader* Tiio::makeWebmReader(){ return nullptr; } diff --git a/toonz/sources/image/ffmpeg/tiio_webm.h b/toonz/sources/image/ffmpeg/tiio_webm.h index 332db6e..607bbb0 100644 --- a/toonz/sources/image/ffmpeg/tiio_webm.h +++ b/toonz/sources/image/ffmpeg/tiio_webm.h @@ -73,8 +73,8 @@ class WebmWriterProperties : public TPropertyGroup { public: // TEnumProperty m_pixelSize; // TBoolProperty m_matte; - TIntProperty m_vidQuality; - TIntProperty m_scale; + TIntProperty m_vidQuality; + TIntProperty m_scale; WebmWriterProperties(); }; diff --git a/toonz/sources/image/pli/tiio_pli.cpp b/toonz/sources/image/pli/tiio_pli.cpp index 1650067..19caa9e 100644 --- a/toonz/sources/image/pli/tiio_pli.cpp +++ b/toonz/sources/image/pli/tiio_pli.cpp @@ -316,7 +316,8 @@ void createStroke(ThickQuadraticChainTag *quadTag, TVectorImage *outVectImage, //----------------------------------------------------------------------------- -static void createGroup(GroupTag *groupTag, TVectorImage *vi, CreateStrokeData &data) { +static void createGroup(GroupTag *groupTag, TVectorImage *vi, + CreateStrokeData &data) { int count = vi->getStrokeCount(); for (int j = 0; j < groupTag->m_numObjects; j++) { if (groupTag->m_object[j]->m_type == PliTag::COLOR_NGOBJ) diff --git a/toonz/sources/image/pli/tiio_pli.h b/toonz/sources/image/pli/tiio_pli.h index 418e791..376c896 100644 --- a/toonz/sources/image/pli/tiio_pli.h +++ b/toonz/sources/image/pli/tiio_pli.h @@ -152,7 +152,6 @@ private: // Functions -TPalette *readPalette(GroupTag *paletteTag, int majorVersion, - int minorVersion); +TPalette *readPalette(GroupTag *paletteTag, int majorVersion, int minorVersion); #endif // TTIO_PLI_INCLUDED diff --git a/toonz/sources/image/quantel/filequantel.c b/toonz/sources/image/quantel/filequantel.c index 250c0e5..d42087c 100644 --- a/toonz/sources/image/quantel/filequantel.c +++ b/toonz/sources/image/quantel/filequantel.c @@ -88,7 +88,8 @@ static IMAGE *img_read_region_quantel_interlaced(T_CHAR *fname, int x1, int y1, /*---------------------------------------------------------------------------*/ -static void vpb_string(const char *str, int field_type, char **p_h, char *stop) { +static void vpb_string(const char *str, int field_type, char **p_h, + char *stop) { char *h; int len; @@ -536,8 +537,8 @@ int img_write_quantel(const T_CHAR *fname, void *buffer, int w, int h, /*---------------------------------------------------------------------------*/ -static IMAGE *img_read_region_quantel(T_CHAR *fname, int x1, int y1, int x2, int y2, - int scale, int type) { +static IMAGE *img_read_region_quantel(T_CHAR *fname, int x1, int y1, int x2, + int y2, int scale, int type) { if (type == SDL_FORMAT) return (img_read_region_quantel_no_interlaced(fname, x1, y1, x2, y2, scale, type)); diff --git a/toonz/sources/image/svg/tiio_svg.cpp b/toonz/sources/image/svg/tiio_svg.cpp index 21a344e..51c23ae 100644 --- a/toonz/sources/image/svg/tiio_svg.cpp +++ b/toonz/sources/image/svg/tiio_svg.cpp @@ -1809,7 +1809,8 @@ TLevelWriterSvg::TLevelWriterSvg(const TFilePath &path, TPropertyGroup *winfo) //----------------------------------------------------------------------------- -static void writeRegion(TRegion *r, TPalette *plt, QTextStream &out, double ly) { +static void writeRegion(TRegion *r, TPalette *plt, QTextStream &out, + double ly) { if (r->getEdgeCount() == 0) return; std::vector quadsOutline; @@ -1872,8 +1873,8 @@ static void writeRegion(TRegion *r, TPalette *plt, QTextStream &out, double ly) //-------------------------------------------------------------------------------------- -static void writeOutlineStroke(TStroke *s, TPalette *plt, QTextStream &out, double ly, - double quality) { +static void writeOutlineStroke(TStroke *s, TPalette *plt, QTextStream &out, + double ly, double quality) { if (s->getChunkCount() == 0) return; if (s->getMaxThickness() == 0) return; diff --git a/toonz/sources/image/tiio.cpp b/toonz/sources/image/tiio.cpp index b6a888b..9f3ae19 100644 --- a/toonz/sources/image/tiio.cpp +++ b/toonz/sources/image/tiio.cpp @@ -162,31 +162,28 @@ void initImageIo(bool lightVersion) { TFileType::declare("rgb", TFileType::RASTER_IMAGE); Tiio::defineWriterProperties("rgb", new Tiio::SgiWriterProperties()); - // ffmpeg +// ffmpeg #if !defined(_WIN32) || defined(x64) if (Ffmpeg::checkFfmpeg()) { - bool ffprobe = Ffmpeg::checkFfprobe(); - if (Ffmpeg::checkFormat("webm")) { - TLevelWriter::define("webm", TLevelWriterWebm::create, true); - if (ffprobe) - TLevelReader::define("webm", TLevelReaderWebm::create); - TFileType::declare("webm", TFileType::RASTER_LEVEL); - Tiio::defineWriterProperties("webm", new Tiio::WebmWriterProperties()); - } - if (Ffmpeg::checkFormat("gif")) { - TLevelWriter::define("gif", TLevelWriterGif::create, true); - if (ffprobe) - TLevelReader::define("gif", TLevelReaderGif::create); - TFileType::declare("gif", TFileType::RASTER_LEVEL); - Tiio::defineWriterProperties("gif", new Tiio::GifWriterProperties()); - } - if (Ffmpeg::checkFormat("mp4")) { - TLevelWriter::define("mp4", TLevelWriterMp4::create, true); - if (ffprobe) - TLevelReader::define("mp4", TLevelReaderMp4::create); - TFileType::declare("mp4", TFileType::RASTER_LEVEL); - Tiio::defineWriterProperties("mp4", new Tiio::Mp4WriterProperties()); - } + bool ffprobe = Ffmpeg::checkFfprobe(); + if (Ffmpeg::checkFormat("webm")) { + TLevelWriter::define("webm", TLevelWriterWebm::create, true); + if (ffprobe) TLevelReader::define("webm", TLevelReaderWebm::create); + TFileType::declare("webm", TFileType::RASTER_LEVEL); + Tiio::defineWriterProperties("webm", new Tiio::WebmWriterProperties()); + } + if (Ffmpeg::checkFormat("gif")) { + TLevelWriter::define("gif", TLevelWriterGif::create, true); + if (ffprobe) TLevelReader::define("gif", TLevelReaderGif::create); + TFileType::declare("gif", TFileType::RASTER_LEVEL); + Tiio::defineWriterProperties("gif", new Tiio::GifWriterProperties()); + } + if (Ffmpeg::checkFormat("mp4")) { + TLevelWriter::define("mp4", TLevelWriterMp4::create, true); + if (ffprobe) TLevelReader::define("mp4", TLevelReaderMp4::create); + TFileType::declare("mp4", TFileType::RASTER_LEVEL); + Tiio::defineWriterProperties("mp4", new Tiio::Mp4WriterProperties()); + } } #endif // end ffmpeg diff --git a/toonz/sources/image/tzl/tiio_tzl.cpp b/toonz/sources/image/tzl/tiio_tzl.cpp index f64cfe5..bd69682 100644 --- a/toonz/sources/image/tzl/tiio_tzl.cpp +++ b/toonz/sources/image/tzl/tiio_tzl.cpp @@ -130,20 +130,15 @@ bool readVersion(FILE *chan, int &version) { fread(&magic, sizeof(char), 8, chan); if (memcmp(magic, "TLV10", 5) == 0) { version = 10; - } - else if (memcmp(magic, "TLV11", 5) == 0) { + } else if (memcmp(magic, "TLV11", 5) == 0) { version = 11; - } - else if (memcmp(magic, "TLV12", 5) == 0) { + } else if (memcmp(magic, "TLV12", 5) == 0) { version = 12; - } - else if (memcmp(magic, "TLV13", 5) == 0) { + } else if (memcmp(magic, "TLV13", 5) == 0) { version = 13; - } - else if (memcmp(magic, "TLV14", 5) == 0) { + } else if (memcmp(magic, "TLV14", 5) == 0) { version = 14; - } - else { + } else { return false; } return true; @@ -286,8 +281,8 @@ bool readHeaderAndOffsets(FILE *chan, TzlOffsetMap &frameOffsTable, } } -static bool adjustIconAspectRatio(TDimension &outDimension, TDimension inDimension, - TDimension imageRes) { +static bool adjustIconAspectRatio(TDimension &outDimension, + TDimension inDimension, TDimension imageRes) { TINT32 iconLx = inDimension.lx, iconLy = inDimension.ly; assert(iconLx > 0 && iconLy > 0); assert(imageRes.lx > 0 && imageRes.ly > 0); diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.h index f1b39fd..4a1c251 100644 --- a/toonz/sources/include/toonz/preferences.h +++ b/toonz/sources/include/toonz/preferences.h @@ -440,7 +440,7 @@ private: int m_autosavePeriod, // minutes m_chunkSize, m_blanksCount, m_onionPaperThickness, m_step, m_shrink, m_textureSize, m_autocreationType, m_keyframeType, m_animationStep, - m_ffmpegTimeout; //seconds + m_ffmpegTimeout; // seconds int m_currentLanguage, m_currentStyleSheet, m_undoMemorySize, // in megabytes diff --git a/toonz/sources/include/toonz/tcolumnfx.h b/toonz/sources/include/toonz/tcolumnfx.h index 148cd56..38a0c9b 100644 --- a/toonz/sources/include/toonz/tcolumnfx.h +++ b/toonz/sources/include/toonz/tcolumnfx.h @@ -285,7 +285,6 @@ private: // TColumnFx functions //******************************************************************************************* -bool isSubsheetChainOnColumn0(TXsheet *topXsheet, TXsheet *subsheet, - int frame); +bool isSubsheetChainOnColumn0(TXsheet *topXsheet, TXsheet *subsheet, int frame); #endif // TCOLUMNFX_H diff --git a/toonz/sources/include/toonzqt/camerasettingswidget.h b/toonz/sources/include/toonzqt/camerasettingswidget.h index 5cf3e0c..18fc23b 100644 --- a/toonz/sources/include/toonzqt/camerasettingswidget.h +++ b/toonz/sources/include/toonzqt/camerasettingswidget.h @@ -86,6 +86,7 @@ class DVAPI CameraSettingsWidget final : public QFrame { QLabel *m_dpiLabel; QLabel *m_resLabel; QLabel *m_xLabel; + QLabel *m_unitLabel; QPushButton *m_fspChk; // Force Squared Pixel => dpix == dpiy diff --git a/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h b/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h index 47037a5..90c5f29 100644 --- a/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h +++ b/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h @@ -60,7 +60,7 @@ public: void setCameraPresetListFile(const TFilePath &fp); // CleanupParameters => CleanupCameraSettingsWidget fields - void setFields(const CleanupParameters *cleanupParameters); + void setFields(CleanupParameters *cleanupParameters); // CleanupCameraSettingsWidget fields => CleanupParameters void getFields(CleanupParameters *cleanupParameters); diff --git a/toonz/sources/sound/aiff/tsio_aiff.cpp b/toonz/sources/sound/aiff/tsio_aiff.cpp index cdcccf2..ba04c99 100644 --- a/toonz/sources/sound/aiff/tsio_aiff.cpp +++ b/toonz/sources/sound/aiff/tsio_aiff.cpp @@ -21,7 +21,6 @@ TNZ_LITTLE_ENDIAN undefined !! using namespace std; - TUINT32 convertToLong(UCHAR *buffer); void storeFloat(unsigned char *buffer, TUINT32 value); diff --git a/toonz/sources/sound/tsioutils.h b/toonz/sources/sound/tsioutils.h index 4d5cad1..abf75c0 100644 --- a/toonz/sources/sound/tsioutils.h +++ b/toonz/sources/sound/tsioutils.h @@ -3,7 +3,6 @@ #ifndef TSIOUTILS_INCLUDED #define TSIOUTILS_INCLUDED -void swapAndCopySamples(short *srcBuffer, short *dstBuffer, - TINT32 sampleCount); +void swapAndCopySamples(short *srcBuffer, short *dstBuffer, TINT32 sampleCount); #endif diff --git a/toonz/sources/stdfx/backlitfx.cpp b/toonz/sources/stdfx/backlitfx.cpp index cd0c4b7..cefc338 100644 --- a/toonz/sources/stdfx/backlitfx.cpp +++ b/toonz/sources/stdfx/backlitfx.cpp @@ -11,8 +11,9 @@ //--------------------------------------------------------------------- -static void backlit(TRaster32P lighted, TRaster32P light, TRaster32P out, double blur, - const TPixel &color, double fade, double scale) { +static void backlit(TRaster32P lighted, TRaster32P light, TRaster32P out, + double blur, const TPixel &color, double fade, + double scale) { assert(light && lighted && out); assert(lighted->getSize() == light->getSize()); @@ -92,8 +93,9 @@ static void backlit(TRaster32P lighted, TRaster32P light, TRaster32P out, double //--------------------------------------------------------------------- -static void backlit(TRaster64P lighted, TRaster64P light, TRaster64P out, double blur, - const TPixel &color32, double fade, double scale) { +static void backlit(TRaster64P lighted, TRaster64P light, TRaster64P out, + double blur, const TPixel &color32, double fade, + double scale) { assert(light && lighted && out); assert(lighted->getSize() == light->getSize()); diff --git a/toonz/sources/stdfx/iwa_particlesengine.cpp b/toonz/sources/stdfx/iwa_particlesengine.cpp index 0bb91ca..0e41d9f 100644 --- a/toonz/sources/stdfx/iwa_particlesengine.cpp +++ b/toonz/sources/stdfx/iwa_particlesengine.cpp @@ -1347,7 +1347,8 @@ void Iwa_Particles_Engine::fill_single_region( まだ出発していない粒子情報を初期化 ----------------------------------------------------------------*/ -static bool potentialLessThan(const ParticleOrigin &po1, const ParticleOrigin &po2) { +static bool potentialLessThan(const ParticleOrigin &po1, + const ParticleOrigin &po2) { return po1.potential < po2.potential; } diff --git a/toonz/sources/stdfx/pins.cpp b/toonz/sources/stdfx/pins.cpp index 518974b..1e041b7 100644 --- a/toonz/sources/stdfx/pins.cpp +++ b/toonz/sources/stdfx/pins.cpp @@ -488,8 +488,8 @@ static int splitMatrix(double **a, int n, int *index) { /*-----------------------------------------------------------------*/ -static void buildMatrixes(const FourPoints &ss, const FourPoints &dd, double **a, - double *b) { +static void buildMatrixes(const FourPoints &ss, const FourPoints &dd, + double **a, double *b) { int i; TPointD s[4], d[4]; diff --git a/toonz/sources/stdfx/shadingcontext.cpp b/toonz/sources/stdfx/shadingcontext.cpp index 75a68bd..851c214 100644 --- a/toonz/sources/stdfx/shadingcontext.cpp +++ b/toonz/sources/stdfx/shadingcontext.cpp @@ -14,6 +14,7 @@ #include #include #include +#include // STD includes #include @@ -109,7 +110,17 @@ ShadingContext::ShadingContext() : m_imp(new Imp) { //-------------------------------------------------------- -ShadingContext::~ShadingContext() {} +ShadingContext::~ShadingContext() { +#ifdef MACOSX + // Destructor of QGLPixelBuffer calls QOpenGLContext::makeCurrent() + // internally, + // so the current thread must be the owner of QGLPixelBuffer context, + // when the destructor of m_imp->m_context is called. + + m_imp->m_pixelBuffer->context()->contextHandle()->moveToThread( + QThread::currentThread()); +#endif +} //-------------------------------------------------------- @@ -154,11 +165,22 @@ USE HARDWARE ACCELERATION */ //-------------------------------------------------------- -void ShadingContext::makeCurrent() { m_imp->m_pixelBuffer->makeCurrent(); } +void ShadingContext::makeCurrent() { +#ifdef MACOSX + m_imp->m_pixelBuffer->context()->contextHandle()->moveToThread( + QThread::currentThread()); +#endif + m_imp->m_pixelBuffer->makeCurrent(); +} //-------------------------------------------------------- -void ShadingContext::doneCurrent() { m_imp->m_pixelBuffer->doneCurrent(); } +void ShadingContext::doneCurrent() { +#ifdef MACOSX + m_imp->m_pixelBuffer->context()->contextHandle()->moveToThread(0); +#endif + m_imp->m_pixelBuffer->doneCurrent(); +} //-------------------------------------------------------- diff --git a/toonz/sources/tnzbase/tscanner/tscannertwain.cpp b/toonz/sources/tnzbase/tscanner/tscannertwain.cpp index e907117..d76170d 100644 --- a/toonz/sources/tnzbase/tscanner/tscannertwain.cpp +++ b/toonz/sources/tnzbase/tscanner/tscannertwain.cpp @@ -9,7 +9,7 @@ using namespace TScannerUtil; extern "C" { #include "../common/twain/ttwain_util.h" -#include "../common/twain/ttwain_global_def.h" /* forward declare functions */ +#include "../common/twain/ttwain_global_def.h" /* forward declare functions */ } /* callback used to handle TTWAIN done/error status*/ @@ -20,7 +20,7 @@ extern "C" void TTWAIN_ErrorBox(const char *msg) { throwIT(msg); } extern "C" { static int onDoneCB(UCHAR *buffer, TTWAIN_PIXTYPE pixelType, int lx, int ly, - int wrap, float xdpi, float ydpi, void *usrData) { + int wrap, float xdpi, float ydpi, void *usrData) { TRasterP ras; switch (pixelType) { case TTWAIN_BW: @@ -223,7 +223,8 @@ param.m_version = string(TTWAIN_GetVersion()); //----------------------------------------------------------------------------- -static void setupParameters(const TScannerParameters ¶ms, bool isAreaSupported) { +static void setupParameters(const TScannerParameters ¶ms, + bool isAreaSupported) { if (isAreaSupported) { TRectD scanArea = params.getScanArea(); float L = (float)(scanArea.getP00().x / 25.4); diff --git a/toonz/sources/tnztools/geometrictool.cpp b/toonz/sources/tnztools/geometrictool.cpp index 3014d02..617d3e3 100644 --- a/toonz/sources/tnztools/geometrictool.cpp +++ b/toonz/sources/tnztools/geometrictool.cpp @@ -92,8 +92,8 @@ static TPointD computeSpeed(TPointD p0, TPointD p1, double factor) { //----------------------------------------------------------------------------- -static TRect drawBluredBrush(const TRasterImageP &ri, TStroke *stroke, int thick, - double hardness, double opacity) { +static TRect drawBluredBrush(const TRasterImageP &ri, TStroke *stroke, + int thick, double hardness, double opacity) { TStroke *s = new TStroke(*stroke); TPointD riCenter = ri->getRaster()->getCenterD(); s->transform(TTranslation(riCenter)); diff --git a/toonz/sources/tnztools/imagegrouping.cpp b/toonz/sources/tnztools/imagegrouping.cpp index 5020392..72f2624 100644 --- a/toonz/sources/tnztools/imagegrouping.cpp +++ b/toonz/sources/tnztools/imagegrouping.cpp @@ -616,9 +616,9 @@ refStroke, count, refStroke+count)>commonDepth(vimg, refStroke, count, prev)) if(count==0) return; */ -static int doMoveGroup(UCHAR moveType, TVectorImage *vimg, - const std::vector> &selectedGroups, - int index) { +static int doMoveGroup( + UCHAR moveType, TVectorImage *vimg, + const std::vector> &selectedGroups, int index) { int refStroke = vimg->getStrokeIndex(selectedGroups[index].first); int count = selectedGroups[index].second; diff --git a/toonz/sources/tnztools/plastictool.cpp b/toonz/sources/tnztools/plastictool.cpp index 8bffbe0..c877c3c 100644 --- a/toonz/sources/tnztools/plastictool.cpp +++ b/toonz/sources/tnztools/plastictool.cpp @@ -1693,7 +1693,8 @@ static void drawFilledSquare(const TPointD &pos, double radius) { //------------------------------------------------------------------------ -static void drawHandle(const TPointD &pos, double radius, const TPixel32 &color) { +static void drawHandle(const TPointD &pos, double radius, + const TPixel32 &color) { glColor4ub(0, 0, 0, color.m); // Black border glLineWidth(4.0f); drawSquare(pos, radius); @@ -1705,8 +1706,8 @@ static void drawHandle(const TPointD &pos, double radius, const TPixel32 &color) //------------------------------------------------------------------------ -static void drawFilledHandle(const TPointD &pos, double radius, double pixelSize, - const TPixel32 &color) { +static void drawFilledHandle(const TPointD &pos, double radius, + double pixelSize, const TPixel32 &color) { glColor4ub(0, 0, 0, color.m); drawFilledSquare(pos, radius + pixelSize); @@ -1716,7 +1717,8 @@ static void drawFilledHandle(const TPointD &pos, double radius, double pixelSize //------------------------------------------------------------------------ -static void drawText(const TPointD &pos, const QString &text, double fontScale) { +static void drawText(const TPointD &pos, const QString &text, + double fontScale) { // Get the world-to-window affine double matrix[16]; diff --git a/toonz/sources/tnztools/skeletontool.cpp b/toonz/sources/tnztools/skeletontool.cpp index 6f3620c..3f425c9 100644 --- a/toonz/sources/tnztools/skeletontool.cpp +++ b/toonz/sources/tnztools/skeletontool.cpp @@ -91,8 +91,8 @@ static bool isAncestorOf(int ancestorIndex, int descendentIndex) { //------------------------------------------------------------ -static void getHooks(std::vector &hooks, TXsheet *xsh, int row, int col, - TPointD dpiScale) { +static void getHooks(std::vector &hooks, TXsheet *xsh, int row, + int col, TPointD dpiScale) { // nota. hook position is in the coordinate system of the parent object. // a inch is Stage::inch diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txt index f430c1a..0215c13 100644 --- a/toonz/sources/toonz/CMakeLists.txt +++ b/toonz/sources/toonz/CMakeLists.txt @@ -1,4 +1,4 @@ -set(VERSION 1.0) +set(VERSION 1.1) set(MOC_HEADERS addfilmstripframespopup.h diff --git a/toonz/sources/toonz/camerasettingspopup.cpp b/toonz/sources/toonz/camerasettingspopup.cpp index 8735cc3..ec52cd0 100644 --- a/toonz/sources/toonz/camerasettingspopup.cpp +++ b/toonz/sources/toonz/camerasettingspopup.cpp @@ -33,6 +33,7 @@ #include "toonz/stage2.h" #include "toonz/txshsimplelevel.h" #include "toonz/txshleveltypes.h" +#include "toonz/preferences.h" // TnzCore includes #include "tconvert.h" @@ -241,6 +242,10 @@ void CameraSettingsPopup::updateFields() { if (!cameraObject) return; // it should never happen m_nameFld->setText(QString(cameraObject->getName().c_str())); TCamera *camera = cameraObject->getCamera(); + if (Preferences::instance()->getPixelsOnly()) { + TDimension res = camera->getRes(); + camera->setSize(TDimensionD(res.lx / Stage::inch, res.ly / Stage::inch)); + } if (camera) m_cameraSettingsWidget->setFields(camera); } diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cpp index d0a0056..6774dcf 100644 --- a/toonz/sources/toonz/cellselection.cpp +++ b/toonz/sources/toonz/cellselection.cpp @@ -1198,7 +1198,8 @@ void TCellSelection::copyCells() { //----------------------------------------------------------------------------- -static void pasteStrokesInCell(int row, int col, const StrokesData *strokesData) { +static void pasteStrokesInCell(int row, int col, + const StrokesData *strokesData) { PasteStrokesInCellUndo *undo = new PasteStrokesInCellUndo(row, col, strokesData); std::vector indices; @@ -1775,7 +1776,8 @@ void setNewDrawing(TXsheet *xsh, int row, int col, const TImageP &img) //----------------------------------------------------------------------------- -static void createNewDrawing(TXsheet *xsh, int row, int col, int preferredLevelType) { +static void createNewDrawing(TXsheet *xsh, int row, int col, + int preferredLevelType) { // search for the level TXshCell old = xsh->getCell(row, col); if (old.isEmpty()) { diff --git a/toonz/sources/toonz/cleanupsettingspane.cpp b/toonz/sources/toonz/cleanupsettingspane.cpp index 22751b5..d7e5579 100644 --- a/toonz/sources/toonz/cleanupsettingspane.cpp +++ b/toonz/sources/toonz/cleanupsettingspane.cpp @@ -394,7 +394,8 @@ void CleanupSettingsPane::updateImageInfo() { parentWidget()->setWindowTitle(tr("Cleanup Settings (Global)")); else parentWidget()->setWindowTitle( - tr("Cleanup Settings: ") + toQString(model->clnPath().withoutParentDir())); + tr("Cleanup Settings: ") + + toQString(model->clnPath().withoutParentDir())); } //----------------------------------------------------------------------------- diff --git a/toonz/sources/toonz/dvitemview.cpp b/toonz/sources/toonz/dvitemview.cpp index 9676659..5c7e0f6 100644 --- a/toonz/sources/toonz/dvitemview.cpp +++ b/toonz/sources/toonz/dvitemview.cpp @@ -1878,9 +1878,9 @@ DvItemViewerButtonBar::DvItemViewerButtonBar(DvItemViewer *itemViewer, connect(listView, SIGNAL(triggered()), itemViewer->getPanel(), SLOT(setTableView())); // connect(listView , SIGNAL(triggered()), itemViewer->getPanel(), - //SLOT(setListView())); + // SLOT(setListView())); // connect(tableView , SIGNAL(triggered()), itemViewer->getPanel(), - //SLOT(setTableView())); + // SLOT(setTableView())); connect(m_folderBack, SIGNAL(triggered()), SIGNAL(folderBack())); connect(m_folderFwd, SIGNAL(triggered()), SIGNAL(folderFwd())); diff --git a/toonz/sources/toonz/exportlevelpopup.cpp b/toonz/sources/toonz/exportlevelpopup.cpp index c5e0a2d..98d167d 100644 --- a/toonz/sources/toonz/exportlevelpopup.cpp +++ b/toonz/sources/toonz/exportlevelpopup.cpp @@ -393,19 +393,19 @@ void ExportLevelPopup::showEvent(QShowEvent *se) { { TSelectionHandle *selectionHandle = TApp::instance()->getCurrentSelection(); TSelection *selection = selectionHandle->getSelection(); - if (Preferences::instance()->getPixelsOnly()) { - m_exportOptions->m_widthFld->hide(); - m_exportOptions->m_heightFld->hide(); - m_exportOptions->m_widthLabel->hide(); - m_exportOptions->m_heightLabel->hide(); - m_exportOptions->m_dpiLabel->hide(); - } else { - m_exportOptions->m_widthFld->show(); - m_exportOptions->m_heightFld->show(); - m_exportOptions->m_widthLabel->show(); - m_exportOptions->m_heightLabel->show(); - m_exportOptions->m_dpiLabel->show(); - } + if (Preferences::instance()->getPixelsOnly()) { + m_exportOptions->m_widthFld->hide(); + m_exportOptions->m_heightFld->hide(); + m_exportOptions->m_widthLabel->hide(); + m_exportOptions->m_heightLabel->hide(); + m_exportOptions->m_dpiLabel->hide(); + } else { + m_exportOptions->m_widthFld->show(); + m_exportOptions->m_heightFld->show(); + m_exportOptions->m_widthLabel->show(); + m_exportOptions->m_heightLabel->show(); + m_exportOptions->m_dpiLabel->show(); + } selectionHandle->pushSelection(); selectionHandle->setSelection(selection); } @@ -737,16 +737,16 @@ ExportLevelPopup::ExportOptions::ExportOptions(QWidget *parent) layout->addLayout(exportBoxLayout, row++, 1, 1, 2, Qt::AlignLeft); { - m_widthFld = new DVGui::MeasuredDoubleLineEdit; - m_heightFld = new DVGui::MeasuredDoubleLineEdit; - m_hResFld = new DVGui::IntLineEdit; - m_vResFld = new DVGui::IntLineEdit; - m_dpiLabel = new QLabel; - m_widthLabel = new QLabel; - m_heightLabel = new QLabel; - m_widthLabel->setText("Width: "); - m_heightLabel->setText("Height: "); - m_resScale = new DVGui::MeasuredDoubleLineEdit; + m_widthFld = new DVGui::MeasuredDoubleLineEdit; + m_heightFld = new DVGui::MeasuredDoubleLineEdit; + m_hResFld = new DVGui::IntLineEdit; + m_vResFld = new DVGui::IntLineEdit; + m_dpiLabel = new QLabel; + m_widthLabel = new QLabel; + m_heightLabel = new QLabel; + m_widthLabel->setText("Width: "); + m_heightLabel->setText("Height: "); + m_resScale = new DVGui::MeasuredDoubleLineEdit; m_widthFld->setRange(0, dmax); m_heightFld->setRange(0, dmax); diff --git a/toonz/sources/toonz/formatsettingspopups.cpp b/toonz/sources/toonz/formatsettingspopups.cpp index c053324..6271ffa 100644 --- a/toonz/sources/toonz/formatsettingspopups.cpp +++ b/toonz/sources/toonz/formatsettingspopups.cpp @@ -161,7 +161,9 @@ void FormatSettingsPopup::buildValueField(int index, TPropertyGroup *props) { double value = prop->getValue(); v->setValues(prop->getValue(), prop->getRange().first, prop->getRange().second); - if (prop->getValue() != value) { prop->setValue(value); } + if (prop->getValue() != value) { + prop->setValue(value); + } } //----------------------------------------------------------------------------- diff --git a/toonz/sources/toonz/levelcreatepopup.cpp b/toonz/sources/toonz/levelcreatepopup.cpp index 2a7ed3d..daa1a89 100644 --- a/toonz/sources/toonz/levelcreatepopup.cpp +++ b/toonz/sources/toonz/levelcreatepopup.cpp @@ -338,9 +338,13 @@ void LevelCreatePopup::showEvent(QShowEvent *) { if (Preferences::instance()->getUnits() == "pixel") { m_dpiFld->hide(); m_dpiLabel->hide(); + m_widthFld->setDecimals(0); + m_heightFld->setDecimals(0); } else { m_dpiFld->show(); m_dpiLabel->show(); + m_widthFld->setDecimals(4); + m_heightFld->setDecimals(4); } } diff --git a/toonz/sources/toonz/levelsettingspopup.cpp b/toonz/sources/toonz/levelsettingspopup.cpp index cf7bdc4..993b58b 100644 --- a/toonz/sources/toonz/levelsettingspopup.cpp +++ b/toonz/sources/toonz/levelsettingspopup.cpp @@ -329,8 +329,8 @@ void LevelSettingsPopup::showEvent(QShowEvent *e) { m_imageDpiLabel->hide(); m_imageDpiTitle->hide(); m_cameraDpiTitle->hide(); - m_imageResTitle->hide(); - m_imageResLabel->hide(); + m_widthFld->setDecimals(0); + m_heightFld->setDecimals(0); } else { m_dpiTypeOm->show(); m_dpiLabel->show(); @@ -343,6 +343,8 @@ void LevelSettingsPopup::showEvent(QShowEvent *e) { m_cameraDpiTitle->show(); m_imageResTitle->show(); m_imageResLabel->show(); + m_widthFld->setDecimals(4); + m_heightFld->setDecimals(4); } } diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp index 90e2de7..619caea 100644 --- a/toonz/sources/toonz/main.cpp +++ b/toonz/sources/toonz/main.cpp @@ -91,8 +91,8 @@ const char *rootVarName = "LINETESTROOT"; const char *systemVarPrefix = "LINETEST"; #else const char *applicationName = "OpenToonz"; -const char *applicationVersion = "1.0"; -const char *applicationRevision = "3"; +const char *applicationVersion = "1.1"; +const char *applicationRevision = "1"; const char *dllRelativePath = "./toonz6.app/Contents/Frameworks"; #endif @@ -105,7 +105,7 @@ TEnv::IntVar EnvSoftwareCurrentFontSize("SoftwareCurrentFontSize", 12); TEnv::StringVar EnvSoftwareCurrentFontWeight("SoftwareCurrentFontWeightIsBold", "Yes"); -const char *applicationFullName = "OpenToonz 1.0.3"; +const char *applicationFullName = "OpenToonz 1.1.1"; const char *rootVarName = "TOONZROOT"; const char *systemVarPrefix = "TOONZ"; diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp index eeea127..a46da23 100644 --- a/toonz/sources/toonz/mainwindow.cpp +++ b/toonz/sources/toonz/mainwindow.cpp @@ -435,22 +435,24 @@ centralWidget->setLayout(centralWidgetLayout);*/ setCommandHandler(MI_About, this, &MainWindow::onAbout); setCommandHandler(MI_MaximizePanel, this, &MainWindow::maximizePanel); setCommandHandler(MI_FullScreenWindow, this, &MainWindow::fullScreenWindow); - //remove ffmpegCache if still exists from crashed exit - QString ffmpegCachePath = ToonzFolder::getCacheRootFolder().getQString() + "//ffmpeg"; + // remove ffmpegCache if still exists from crashed exit + QString ffmpegCachePath = + ToonzFolder::getCacheRootFolder().getQString() + "//ffmpeg"; if (TSystem::doesExistFileOrLevel(TFilePath(ffmpegCachePath))) { - TSystem::rmDirTree(TFilePath(ffmpegCachePath)); + TSystem::rmDirTree(TFilePath(ffmpegCachePath)); } } //----------------------------------------------------------------------------- -MainWindow::~MainWindow() { - TEnv::saveAllEnvVariables(); - //cleanup ffmpeg cache - QString ffmpegCachePath = ToonzFolder::getCacheRootFolder().getQString() + "//ffmpeg"; - if (TSystem::doesExistFileOrLevel(TFilePath(ffmpegCachePath))) { - TSystem::rmDirTree(TFilePath(ffmpegCachePath)); - } +MainWindow::~MainWindow() { + TEnv::saveAllEnvVariables(); + // cleanup ffmpeg cache + QString ffmpegCachePath = + ToonzFolder::getCacheRootFolder().getQString() + "//ffmpeg"; + if (TSystem::doesExistFileOrLevel(TFilePath(ffmpegCachePath))) { + TSystem::rmDirTree(TFilePath(ffmpegCachePath)); + } } //----------------------------------------------------------------------------- @@ -1679,9 +1681,9 @@ void MainWindow::defineActions() { MenuScanCleanupCommandType); createMenuScanCleanupAction(MI_Cleanup, tr("&Cleanup"), ""); - + createMenuScanCleanupAction(MI_PencilTest, tr("&Camera Capture..."), ""); - + createMenuLevelAction(MI_AddFrames, tr("&Add Frames..."), ""); createMenuLevelAction(MI_Renumber, tr("&Renumber..."), ""); createMenuLevelAction(MI_ReplaceLevel, tr("&Replace Level..."), ""); @@ -1997,8 +1999,8 @@ void MainWindow::defineActions() { createRightClickMenuAction(MI_UnlockAllColumns, tr("Unlock All"), ""); createRightClickMenuAction(MI_ToggleColumnLocks, tr("Swap Lock/Unlock"), ""); /*-- カレントカラムの右側のカラムを全て非表示にするコマンド --*/ - createRightClickMenuAction(MI_DeactivateUpperColumns, tr("Hide Upper Columns"), - ""); + createRightClickMenuAction(MI_DeactivateUpperColumns, + tr("Hide Upper Columns"), ""); createToolAction(T_Edit, "edit", tr("Edit Tool"), "E"); createToolAction(T_Selection, "selection", tr("Selection Tool"), "S"); @@ -2104,7 +2106,8 @@ void MainWindow::defineActions() { createToolOptionsAction("A_ToolOption_TypeSize", tr("TypeTool Size"), ""); createToolOptionsAction("A_ToolOption_TypeStyle", tr("TypeTool Style"), ""); - createToolOptionsAction("A_ToolOption_EditToolActiveAxis", tr("Active Axis"), ""); + createToolOptionsAction("A_ToolOption_EditToolActiveAxis", tr("Active Axis"), + ""); createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Position", tr("Active Axis - Position"), ""); createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Rotation", diff --git a/toonz/sources/toonz/matchline.cpp b/toonz/sources/toonz/matchline.cpp index f6c0540..763277a 100644 --- a/toonz/sources/toonz/matchline.cpp +++ b/toonz/sources/toonz/matchline.cpp @@ -995,8 +995,8 @@ void DeleteInkDialog::setRange(const QString &str) { m_frames->setText(str); } DeleteLinesコマンドから呼ばれる場合:chooseInkがtrue --*/ -static void doDeleteMatchlines(TXshSimpleLevel *sl, const std::set &fids, - bool chooseInk) { +static void doDeleteMatchlines(TXshSimpleLevel *sl, + const std::set &fids, bool chooseInk) { std::vector indexes; // vector images; std::vector frames; diff --git a/toonz/sources/toonz/menubar.cpp b/toonz/sources/toonz/menubar.cpp index 9efd565..0e15726 100644 --- a/toonz/sources/toonz/menubar.cpp +++ b/toonz/sources/toonz/menubar.cpp @@ -1066,8 +1066,8 @@ QMenuBar *StackedMenuBar::createFullMenuBar() { QMenu *fileMenu = addMenu(tr("File"), fullMenuBar); addMenuItem(fileMenu, MI_NewScene); addMenuItem(fileMenu, MI_LoadScene); - addMenuItem(fileMenu, MI_SaveScene); addMenuItem(fileMenu, MI_SaveAll); + addMenuItem(fileMenu, MI_SaveScene); addMenuItem(fileMenu, MI_SaveSceneAs); addMenuItem(fileMenu, MI_OpenRecentScene); addMenuItem(fileMenu, MI_RevertScene); @@ -1171,6 +1171,7 @@ QMenuBar *StackedMenuBar::createFullMenuBar() { addMenuItem(scanCleanupMenu, MI_CameraTest); addMenuItem(scanCleanupMenu, MI_Cleanup); scanCleanupMenu->addSeparator(); + addMenuItem(scanCleanupMenu, MI_PencilTest); #endif // Menu' LEVEL diff --git a/toonz/sources/toonz/pltgizmopopup.cpp b/toonz/sources/toonz/pltgizmopopup.cpp index 390d720..4177e43 100644 --- a/toonz/sources/toonz/pltgizmopopup.cpp +++ b/toonz/sources/toonz/pltgizmopopup.cpp @@ -50,7 +50,8 @@ static void getStyles(std::vector &styles, //----------------------------------------------------------------------------- -static void getStyleIds(std::vector &styleIds, const TStyleSelection &selection) { +static void getStyleIds(std::vector &styleIds, + const TStyleSelection &selection) { styleIds.clear(); int pageIndex = selection.getPageIndex(); TPaletteP palette = selection.getPalette(); diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cpp index 0ac1767..0f0cfeb 100644 --- a/toonz/sources/toonz/preferencespopup.cpp +++ b/toonz/sources/toonz/preferencespopup.cpp @@ -852,7 +852,7 @@ void PreferencesPopup::onFfmpegPathChanged() { //----------------------------------------------------------------------------- void PreferencesPopup::onFfmpegTimeoutChanged() { - m_pref->setFfmpegTimeout(m_ffmpegTimeout->getValue()); + m_pref->setFfmpegTimeout(m_ffmpegTimeout->getValue()); } //********************************************************************************** @@ -990,7 +990,7 @@ PreferencesPopup::PreferencesPopup() //--- Import/Export ------------------------------ categoryList->addItem(tr("Import/Export")); m_ffmpegPathFileFld = new DVGui::FileField(this, QString("")); - m_ffmpegTimeout = new DVGui::IntLineEdit(this, 30, 1); + m_ffmpegTimeout = new DVGui::IntLineEdit(this, 30, 1); //--- Drawing ------------------------------ categoryList->addItem(tr("Drawing")); @@ -1543,15 +1543,13 @@ PreferencesPopup::PreferencesPopup() 0, Qt::AlignCenter | Qt::AlignVCenter); ioLay->addWidget(new QLabel(tr("FFmpeg is not bundled with OpenToonz")), 0, Qt::AlignCenter | Qt::AlignVCenter); - ioLay->addWidget(new QLabel(" "), - 0, Qt::AlignCenter | Qt::AlignVCenter); - ioLay->addWidget(new QLabel(tr("NOTE: This is an experimental feature.")), - 0, Qt::AlignCenter | Qt::AlignVCenter); - ioLay->addWidget(new QLabel(tr("Please SAVE YOUR WORK before exporting " - "in MP4, WEBM, or GIF format.")), - 0, Qt::AlignCenter | Qt::AlignVCenter); - ioLay->addWidget(new QLabel(" "), - 0, Qt::AlignCenter | Qt::AlignVCenter); + ioLay->addWidget(new QLabel(" "), 0, Qt::AlignCenter | Qt::AlignVCenter); + ioLay->addWidget(new QLabel(tr("NOTE: This is an experimental feature.")), + 0, Qt::AlignCenter | Qt::AlignVCenter); + ioLay->addWidget(new QLabel(tr("Please SAVE YOUR WORK before exporting " + "in MP4, WEBM, or GIF format.")), + 0, Qt::AlignCenter | Qt::AlignVCenter); + ioLay->addWidget(new QLabel(" "), 0, Qt::AlignCenter | Qt::AlignVCenter); ioLay->addWidget(new QLabel(tr("Please provide the path where FFmpeg is " "located on your computer.")), 0, Qt::AlignLeft | Qt::AlignVCenter); @@ -1563,14 +1561,18 @@ PreferencesPopup::PreferencesPopup() ioGridLay->addWidget(new QLabel(tr("FFmpeg Path: ")), 0, 0, Qt::AlignRight); ioGridLay->addWidget(m_ffmpegPathFileFld, 0, 1, 1, 3); - ioGridLay->addWidget(new QLabel(" "), 1, 0); - ioGridLay->addWidget(new QLabel(tr("Number of seconds to wait for FFmpeg to complete " - "processing the output:")), 2, 0, 1, 4); - ioGridLay->addWidget(new QLabel(tr("Note: FFmpeg begins working once all images " - "have been processed.")), 3, 0, 1, 4); - ioGridLay->addWidget(new QLabel(tr("FFmpeg Timeout:")), 4, 0, - Qt::AlignRight); - ioGridLay->addWidget(m_ffmpegTimeout, 4, 1, 1, 3); + ioGridLay->addWidget(new QLabel(" "), 1, 0); + ioGridLay->addWidget( + new QLabel(tr("Number of seconds to wait for FFmpeg to complete " + "processing the output:")), + 2, 0, 1, 4); + ioGridLay->addWidget( + new QLabel(tr("Note: FFmpeg begins working once all images " + "have been processed.")), + 3, 0, 1, 4); + ioGridLay->addWidget(new QLabel(tr("FFmpeg Timeout:")), 4, 0, + Qt::AlignRight); + ioGridLay->addWidget(m_ffmpegTimeout, 4, 1, 1, 3); } ioLay->addLayout(ioGridLay); ioLay->addStretch(1); @@ -1920,7 +1922,7 @@ PreferencesPopup::PreferencesPopup() ret = ret && connect(m_ffmpegPathFileFld, SIGNAL(pathChanged()), this, SLOT(onFfmpegPathChanged())); ret = ret && connect(m_ffmpegTimeout, SIGNAL(editingFinished()), this, - SLOT(onFfmpegTimeoutChanged())); + SLOT(onFfmpegTimeoutChanged())); //--- Drawing ---------------------- ret = ret && connect(keepOriginalCleanedUpCB, SIGNAL(stateChanged(int)), this, diff --git a/toonz/sources/toonz/sceneviewercontextmenu.cpp b/toonz/sources/toonz/sceneviewercontextmenu.cpp index ed8c2e5..8211476 100644 --- a/toonz/sources/toonz/sceneviewercontextmenu.cpp +++ b/toonz/sources/toonz/sceneviewercontextmenu.cpp @@ -81,7 +81,7 @@ static void onShowHideSelectObject(QAction *action) { } static int addShowHideStageObjectCmds(const std::vector &columnIndexes, - QMenu *menu, bool isShow) { + QMenu *menu, bool isShow) { int ii, columnIndex = -1; bool flag = true; @@ -248,7 +248,7 @@ void SceneViewerContextMenu::addShowHideCommand(QMenu *menu, TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet(); TStageObject *stageObject = xsh->getStageObject(TStageObjectId::ColumnId(column->getIndex())); - QString text = (isHidden ? tr("Show ") : tr("Hide ")) + getName(stageObject); + QString text = (isHidden ? tr("Show ") : tr("Hide ")) + getName(stageObject); QAction *action = new QAction(text, this); action->setData(column->getIndex()); connect(action, SIGNAL(triggered()), this, SLOT(onShowHide())); diff --git a/toonz/sources/toonz/scriptconsolepanel.cpp b/toonz/sources/toonz/scriptconsolepanel.cpp index 1b0dd21..a18c37c 100644 --- a/toonz/sources/toonz/scriptconsolepanel.cpp +++ b/toonz/sources/toonz/scriptconsolepanel.cpp @@ -24,7 +24,8 @@ #include #include -static QScriptValue loadSceneFun(QScriptContext *context, QScriptEngine *engine) { +static QScriptValue loadSceneFun(QScriptContext *context, + QScriptEngine *engine) { if (context->argumentCount() > 0) { QString fpArg = context->argument(0).toString(); TFilePath fp(fpArg.toStdWString()); @@ -33,7 +34,8 @@ static QScriptValue loadSceneFun(QScriptContext *context, QScriptEngine *engine) return QScriptValue(); } -static QScriptValue saveSceneFun(QScriptContext *context, QScriptEngine *engine) { +static QScriptValue saveSceneFun(QScriptContext *context, + QScriptEngine *engine) { if (context->argumentCount() > 0) { QString fpArg = context->argument(0).toString(); TFilePath fp(fpArg.toStdWString()); @@ -42,7 +44,8 @@ static QScriptValue saveSceneFun(QScriptContext *context, QScriptEngine *engine) return QScriptValue(); } -static QScriptValue loadLevelFun(QScriptContext *context, QScriptEngine *engine) { +static QScriptValue loadLevelFun(QScriptContext *context, + QScriptEngine *engine) { if (context->argumentCount() > 0) { QString fpArg = context->argument(0).toString(); TFilePath fp(fpArg.toStdWString()); diff --git a/toonz/sources/toonz/shortcutpopup.cpp b/toonz/sources/toonz/shortcutpopup.cpp index 04d0c19..911a11f 100644 --- a/toonz/sources/toonz/shortcutpopup.cpp +++ b/toonz/sources/toonz/shortcutpopup.cpp @@ -170,9 +170,7 @@ void ShortcutViewer::enterEvent(QEvent *event) { //----------------------------------------------------------------------------- -void ShortcutViewer::leaveEvent(QEvent *event) { - update(); -} +void ShortcutViewer::leaveEvent(QEvent *event) { update(); } //============================================================================= // ShortcutTree diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cpp index b42d586..5e86e02 100644 --- a/toonz/sources/toonz/xshcolumnviewer.cpp +++ b/toonz/sources/toonz/xshcolumnviewer.cpp @@ -110,7 +110,8 @@ namespace XsheetGUI { //----------------------------------------------------------------------------- -static void getVolumeCursorRect(QRect &out, double volume, const QPoint &origin) { +static void getVolumeCursorRect(QRect &out, double volume, + const QPoint &origin) { int ly = 60; int v = tcrop(0, ly, (int)(volume * ly)); out.setX(origin.x() + 11); diff --git a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp index f29df70..024227a 100644 --- a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp +++ b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp @@ -424,7 +424,8 @@ void FarmServerProxy::removeTask(const QString &taskId) { //------------------------------------------------------------------------------ -static bool doTestConnection(const QString &hostName, const QString &addr, int port) { +static bool doTestConnection(const QString &hostName, const QString &addr, + int port) { TTcpIpClient client; int sock; diff --git a/toonz/sources/toonzlib/fill.cpp b/toonz/sources/toonzlib/fill.cpp index b90a286..9f0a25e 100644 --- a/toonz/sources/toonzlib/fill.cpp +++ b/toonz/sources/toonzlib/fill.cpp @@ -456,7 +456,8 @@ void fill(const TRaster32P &ras, const TRaster32P &ref, //----------------------------------------------------------------------------- -static void rectFill(const TRaster32P &ras, const TRect &r, const TPixel32 &color) {} +static void rectFill(const TRaster32P &ras, const TRect &r, + const TPixel32 &color) {} //----------------------------------------------------------------------------- diff --git a/toonz/sources/toonzlib/fxcommand.cpp b/toonz/sources/toonzlib/fxcommand.cpp index 90bbac0..2cec6ff 100644 --- a/toonz/sources/toonzlib/fxcommand.cpp +++ b/toonz/sources/toonzlib/fxcommand.cpp @@ -2037,7 +2037,7 @@ QString DeleteLinksUndo::getHistoryString() { //============================================================= static void deleteLinks(const std::list &links, - TXsheetHandle *xshHandle) { + TXsheetHandle *xshHandle) { std::unique_ptr undo(new DeleteLinksUndo(links, xshHandle)); if (undo->isConsistent()) { undo->redo(); @@ -2299,7 +2299,7 @@ QString DeleteFxOrColumnUndo::getHistoryString() { //============================================================= static void deleteFxs(const std::list &fxs, TXsheetHandle *xshHandle, - TFxHandle *fxHandle) { + TFxHandle *fxHandle) { TUndoManager *undoManager = TUndoManager::manager(); TXsheet *xsh = xshHandle->getXsheet(); @@ -2345,8 +2345,8 @@ void TFxCommand::removeOutputFx(TFx *fx, TXsheetHandle *xshHandle, // Delete Columns command //********************************************************************** -static void deleteColumns(const std::list &columns, TXsheetHandle *xshHandle, - TFxHandle *fxHandle) { +static void deleteColumns(const std::list &columns, + TXsheetHandle *xshHandle, TFxHandle *fxHandle) { TUndoManager *undoManager = TUndoManager::manager(); undoManager->beginBlock(); diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cpp index 0c151a3..294170f 100644 --- a/toonz/sources/toonzlib/preferences.cpp +++ b/toonz/sources/toonzlib/preferences.cpp @@ -286,8 +286,8 @@ Preferences::Preferences() , m_multiLayerStylePickerEnabled(false) , m_paletteTypeOnLoadRasterImageAsColorModel(0) , m_showKeyframesOnXsheetCellArea(true) - , m_precompute(true) - , m_ffmpegTimeout(30) { + , m_precompute(true) + , m_ffmpegTimeout(30) { TCamera camera; m_defLevelType = PLI_XSHLEVEL; m_defLevelWidth = camera.getSize().lx; @@ -544,8 +544,7 @@ Preferences::Preferences() QString ffmpegPath = m_settings->value("ffmpegPath").toString(); if (ffmpegPath != "") m_ffmpegPath = ffmpegPath; setFfmpegPath(m_ffmpegPath.toStdString()); - getValue(*m_settings, "ffmpegTimeout", - m_ffmpegTimeout); + getValue(*m_settings, "ffmpegTimeout", m_ffmpegTimeout); } //----------------------------------------------------------------- @@ -1198,14 +1197,13 @@ void Preferences::setPrecompute(bool enabled) { m_precompute = enabled; } //----------------------------------------------------------------- -void Preferences::setFfmpegTimeout(int seconds) { - m_ffmpegTimeout = seconds; - m_settings->setValue("ffmpegTimeout", seconds); +void Preferences::setFfmpegTimeout(int seconds) { + m_ffmpegTimeout = seconds; + m_settings->setValue("ffmpegTimeout", seconds); } //----------------------------------------------------------------- - int Preferences::addLevelFormat(const LevelFormat &format) { LevelFormatVector::iterator lft = m_levelFormats.insert( std::upper_bound(m_levelFormats.begin(), m_levelFormats.end(), format, diff --git a/toonz/sources/toonzlib/sandor_fxs/blend.cpp b/toonz/sources/toonzlib/sandor_fxs/blend.cpp index ca84b24..e84116c 100644 --- a/toonz/sources/toonzlib/sandor_fxs/blend.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/blend.cpp @@ -304,8 +304,8 @@ inline void getFactors(int tone, double &inkFactor, double &paintFactor) { // Copies the cmIn paint and ink colors to the output rasters. static void buildLayers(const TRasterCM32P &cmIn, - const std::vector &palColors, TRaster32P &inkRaster, - TRaster32P &paintRaster) { + const std::vector &palColors, + TRaster32P &inkRaster, TRaster32P &paintRaster) { // Separate cmIn by copying the ink & paint colors directly to the layer // rasters. TPixelCM32 *cmPix, *cmBegin = (TPixelCM32 *)cmIn->getRawData(); diff --git a/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp b/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp index 065b442..1b2da12 100644 --- a/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp @@ -40,9 +40,9 @@ extern "C" { inr->ly - border - 1, 0, 0) // ----- CALLIGRAPH for UCHAR pixels (range 0-255) -------------------------- -static void calligraphUC(const RASTER *inr, RASTER *outr, CCallParam &par, - const int border, - bool isOutBorder) // throw(SMemAllocError,SWriteRasterError) +static void calligraphUC( + const RASTER *inr, RASTER *outr, CCallParam &par, const int border, + bool isOutBorder) // throw(SMemAllocError,SWriteRasterError) { try { SRECT rect = {border, border, inr->lx - border - 1, inr->ly - border - 1}; @@ -91,9 +91,9 @@ static void calligraphUC(const RASTER *inr, RASTER *outr, CCallParam &par, } // ----- CALLIGRAPH for USHORT pixels (range 0-65535) ------------------------ -static void calligraphUS(const RASTER *inr, RASTER *outr, CCallParam &par, - const int border, - bool isOutBorder) // throw(SMemAllocError,SWriteRasterError) +static void calligraphUS( + const RASTER *inr, RASTER *outr, CCallParam &par, const int border, + bool isOutBorder) // throw(SMemAllocError,SWriteRasterError) { try { SRECT rect = {border, border, inr->lx - border - 1, inr->ly - border - 1}; diff --git a/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp b/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp index c4da195..486e4d3 100644 --- a/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp @@ -45,7 +45,8 @@ extern "C" { // -------------------------- static void patternmapUC( const RASTER *iras, RASTER *oras, CPatternMapParam &pmP, const int border, - RASTER *imgContour) // throw (SMemAllocError,SWriteRasterError,SFileReadError) + RASTER + *imgContour) // throw (SMemAllocError,SWriteRasterError,SFileReadError) { try { SRECT rect = {border, border, iras->lx - border - 1, iras->ly - border - 1}; @@ -125,7 +126,8 @@ static void patternmapUC( // -------------------------- static void patternmapUS( const RASTER *iras, RASTER *oras, CPatternMapParam &pmP, const int border, - RASTER *imgContour) // throw (SMemAllocError,SWriteRasterError,SFileReadError) + RASTER + *imgContour) // throw (SMemAllocError,SWriteRasterError,SFileReadError) { try { SRECT rect = {border, border, iras->lx - border - 1, iras->ly - border - 1}; diff --git a/toonz/sources/toonzlib/scenefx.cpp b/toonz/sources/toonzlib/scenefx.cpp index 91eb5d4..cfe2ed2 100644 --- a/toonz/sources/toonzlib/scenefx.cpp +++ b/toonz/sources/toonzlib/scenefx.cpp @@ -398,7 +398,8 @@ TStageObjectId getMotionObjectId(MotionObjectType type, int index) { //------------------------------------------------------------------- -static TPointD getColumnSpeed(TXsheet *xsh, double row, int col, bool isPreview) { +static TPointD getColumnSpeed(TXsheet *xsh, double row, int col, + bool isPreview) { TAffine aff; TPointD a, b; const double h = 0.001; @@ -428,8 +429,9 @@ static TPointD getColumnSpeed(TXsheet *xsh, double row, int col, bool isPreview) objectId: 移動の参考にするオブジェクト。自分自身の場合はNoneId --*/ static QList getColumnMotionPoints(TXsheet *xsh, double row, int col, - TStageObjectId &objectId, bool isPreview, - double shutterStart, double shutterEnd, + TStageObjectId &objectId, + bool isPreview, double shutterStart, + double shutterEnd, int traceResolution) { /*-- 前後フレームが共に0なら空のリストを返す --*/ if (shutterStart == 0.0 && shutterEnd == 0.0) return QList(); diff --git a/toonz/sources/toonzlib/scriptbinding_outline_vectorizer.cpp b/toonz/sources/toonzlib/scriptbinding_outline_vectorizer.cpp index da3a3f9..9dfb454 100644 --- a/toonz/sources/toonzlib/scriptbinding_outline_vectorizer.cpp +++ b/toonz/sources/toonzlib/scriptbinding_outline_vectorizer.cpp @@ -22,8 +22,9 @@ QScriptValue OutlineVectorizer::ctor(QScriptContext *context, return create(engine, new OutlineVectorizer()); } -static QScriptValue vectorizeImage(QScriptContext *context, QScriptEngine *engine, - const TImageP &src, TPalette *palette, +static QScriptValue vectorizeImage(QScriptContext *context, + QScriptEngine *engine, const TImageP &src, + TPalette *palette, NewOutlineConfiguration *parameters) { VectorizerCore vc; TAffine dpiAff; diff --git a/toonz/sources/toonzlib/scriptbinding_rasterizer.cpp b/toonz/sources/toonzlib/scriptbinding_rasterizer.cpp index 4b1cc39..97e710d 100644 --- a/toonz/sources/toonzlib/scriptbinding_rasterizer.cpp +++ b/toonz/sources/toonzlib/scriptbinding_rasterizer.cpp @@ -28,7 +28,8 @@ QScriptValue Rasterizer::ctor(QScriptContext *context, QScriptEngine *engine) { } static TToonzImageP vectorToToonzRaster(const TVectorImageP &vi, - const TDimension &size, const TAffine &aff, + const TDimension &size, + const TAffine &aff, const TPointD &dpi) { /* TScale sc(dpi.x/Stage::inch, dpi.y/Stage::inch); @@ -47,7 +48,8 @@ TDimension size(bbox.getLx(), bbox.getLy()); return ti; } -static TImageP renderVectorImage(TOfflineGL *glContext, const TVectorRenderData &rd, +static TImageP renderVectorImage(TOfflineGL *glContext, + const TVectorRenderData &rd, const TPointD &dpi, const TImageP &img, const TPixel32 &color) { glContext->clear(color); @@ -57,8 +59,8 @@ static TImageP renderVectorImage(TOfflineGL *glContext, const TVectorRenderData return rimg; } -static void setFrame(QScriptEngine *engine, QScriptValue &level, const TFrameId &fid, - const TImageP &drawing) { +static void setFrame(QScriptEngine *engine, QScriptValue &level, + const TFrameId &fid, const TImageP &drawing) { QScriptValueList args; args << QString::fromStdString(fid.expand()) << Wrapper::create(engine, new Image(drawing.getPointer())); diff --git a/toonz/sources/toonzlib/scriptbinding_renderer.cpp b/toonz/sources/toonzlib/scriptbinding_renderer.cpp index a4f41c7..db9b640 100644 --- a/toonz/sources/toonzlib/scriptbinding_renderer.cpp +++ b/toonz/sources/toonzlib/scriptbinding_renderer.cpp @@ -21,8 +21,8 @@ namespace TScriptBinding { //======================================================= -static QScriptValue getScene(QScriptContext *context, const QScriptValue &sceneArg, - Scene *&scene) { +static QScriptValue getScene(QScriptContext *context, + const QScriptValue &sceneArg, Scene *&scene) { scene = qscriptvalue_cast(sceneArg); if (!scene) return context->throwError( diff --git a/toonz/sources/toonzlib/stagevisitor.cpp b/toonz/sources/toonzlib/stagevisitor.cpp index 351693b..f3746ab 100644 --- a/toonz/sources/toonzlib/stagevisitor.cpp +++ b/toonz/sources/toonzlib/stagevisitor.cpp @@ -682,9 +682,10 @@ void RasterPainter::drawRasterImages(QPainter &p, QPolygon cameraPol) { m_nodes.clear(); } -static void buildAutocloseImage(TVectorImage *vaux, TVectorImage *vi, - const std::vector> &startPoints, - const std::vector> &endPoints) { +static void buildAutocloseImage( + TVectorImage *vaux, TVectorImage *vi, + const std::vector> &startPoints, + const std::vector> &endPoints) { for (UINT i = 0; i < startPoints.size(); i++) { TThickPoint p1 = vi->getStroke(startPoints[i].first) ->getThickPoint(startPoints[i].second); @@ -862,7 +863,6 @@ void RasterPainter::onVectorImage(TVectorImage *vi, delete cf; } - //----------------------------------------------------- /*! Create a \b Node and put it in \b m_nodes. diff --git a/toonz/sources/toonzlib/tcenterlinecolors.cpp b/toonz/sources/toonzlib/tcenterlinecolors.cpp index 47796d8..cc08b42 100644 --- a/toonz/sources/toonzlib/tcenterlinecolors.cpp +++ b/toonz/sources/toonzlib/tcenterlinecolors.cpp @@ -48,8 +48,8 @@ static TPixelCM32 pixel(const TRasterCM32 &ras, int x, int y) { //-------------------------------------------------------------------------- static T3DPointD firstInkChangePosition(const TRasterCM32P &ras, - const T3DPointD &start, const T3DPointD &end, - int threshold) { + const T3DPointD &start, + const T3DPointD &end, int threshold) { double dist = norm(end - start); int sampleMax = tceil(dist), sampleCount = sampleMax + 1; @@ -469,8 +469,8 @@ inline void applyStrokeIndices(VectorizerCoreGlobals *globals) { //-------------------------------------------------------------------------- // Find predominant ink color in a circle of given radius and center -static int getInkPredominance(const TRasterCM32P &ras, TPalette *palette, int x, int y, - int radius, int threshold) { +static int getInkPredominance(const TRasterCM32P &ras, TPalette *palette, int x, + int y, int radius, int threshold) { int i, j; int mx, my, Mx, My; std::vector inksFound(palette->getStyleCount()); diff --git a/toonz/sources/toonzlib/tcolumnfx.cpp b/toonz/sources/toonzlib/tcolumnfx.cpp index b85566a..9b83cd1 100644 --- a/toonz/sources/toonzlib/tcolumnfx.cpp +++ b/toonz/sources/toonzlib/tcolumnfx.cpp @@ -184,7 +184,8 @@ std::string getAlias(TXsheet *xsh, double frame, const TRenderSettings &info) { // Local namespace - Colormap (Sandor) Fxs stuff //**************************************************************************************** -static bool vectorMustApplyCmappedFx(const std::vector &fxs) { +static bool vectorMustApplyCmappedFx( + const std::vector &fxs) { std::vector::const_iterator ft, fEnd(fxs.end()); for (ft = fxs.begin(); ft != fEnd; ++ft) { PaletteFilterFxRenderData *paletteFilterData = @@ -234,7 +235,8 @@ static bool mustApplySandorFx(const std::vector &fxs) { //------------------------------------------------------------------- -static int getEnlargement(const std::vector &fxs, double scale) { +static int getEnlargement(const std::vector &fxs, + double scale) { int enlargement = 1; std::vector::const_iterator ft, fEnd(fxs.end()); @@ -288,8 +290,8 @@ static int getEnlargement(const std::vector &fxs, double s //------------------------------------------------------------------- -static void applyPaletteFilter(TPalette *&plt, bool keep, const set &colors, - const TPalette *srcPlt) { +static void applyPaletteFilter(TPalette *&plt, bool keep, + const set &colors, const TPalette *srcPlt) { if (colors.empty()) return; if (!plt) plt = srcPlt->clone(); @@ -380,8 +382,8 @@ static std::vector getAllBut(std::vector &colorIds) { //! optimizing memory usage, please avoid copying the entire image buffer... static TImageP applyCmappedFx(TToonzImageP &ti, - const std::vector &fxs, int frame, - double scale) { + const std::vector &fxs, + int frame, double scale) { TImageP result = ti; TTile resultTile; // Just a quick wrapper to the ImageCache TPalette *inPalette, *tempPlt; @@ -673,7 +675,8 @@ static TImageP applyCmappedFx(TToonzImageP &ti, //------------------------------------------------------------------- static void applyCmappedFx(TVectorImageP &vi, - const std::vector &fxs, int frame) { + const std::vector &fxs, + int frame) { TRasterP ras; bool keep = false; TPaletteP modPalette; @@ -1348,23 +1351,22 @@ void TLevelColumnFx::getImageInfo(TImageInfo &info, TXshSimpleLevel *sl, if (!storedInfo) // sulle pict caricate info era nullo, ma l'immagine c'e'! // con la getFullSampleFrame riprendo l'immagine e ricalcolo la savebox... { - TImageP img; + TImageP img; if (!(img = sl->getFullsampledFrame(frameId, ImageManager::dontPutInCache))) { assert(false); return; } - //Raster levels from ffmpeg were not giving the right dimensions without the raster cast and check - TRasterImageP rasterImage = (TRasterImageP)img; - if (rasterImage) - { - info.m_lx = (int)rasterImage->getRaster()->getLx(); - info.m_ly = (int)rasterImage->getRaster()->getLy(); - } - else { - info.m_lx = (int)img->getBBox().getLx(); - info.m_ly = (int)img->getBBox().getLy(); - } + // Raster levels from ffmpeg were not giving the right dimensions without + // the raster cast and check + TRasterImageP rasterImage = (TRasterImageP)img; + if (rasterImage) { + info.m_lx = (int)rasterImage->getRaster()->getLx(); + info.m_ly = (int)rasterImage->getRaster()->getLy(); + } else { + info.m_lx = (int)img->getBBox().getLx(); + info.m_ly = (int)img->getBBox().getLy(); + } info.m_x0 = info.m_y0 = 0; info.m_x1 = (int)img->getBBox().getP11().x; info.m_y1 = (int)img->getBBox().getP11().y; diff --git a/toonz/sources/toonzlib/toonzimageutils.cpp b/toonz/sources/toonzlib/toonzimageutils.cpp index 74fd793..7f9302e 100644 --- a/toonz/sources/toonzlib/toonzimageutils.cpp +++ b/toonz/sources/toonzlib/toonzimageutils.cpp @@ -202,9 +202,9 @@ TRectD ToonzImageUtils::convertRasterToWorld(const TRect area, // overlaying inks, blend inks always "lose" on normal inks -static TRect fastAddInkStroke(const TToonzImageP &ti, TStroke *stroke, int inkId, - bool selective, bool filled, TRectD clip, - bool doAntialiasing = true, +static TRect fastAddInkStroke(const TToonzImageP &ti, TStroke *stroke, + int inkId, bool selective, bool filled, + TRectD clip, bool doAntialiasing = true, const set &blendInks = set()) { TRasterCM32P ras = ti->getRaster(); TOfflineGL *gl = 0; diff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cpp index 173c33e..407fac9 100644 --- a/toonz/sources/toonzlib/txshsimplelevel.cpp +++ b/toonz/sources/toonzlib/txshsimplelevel.cpp @@ -1013,7 +1013,8 @@ void getLoadingLevelRange(TFrameId &fromFid, TFrameId &toFid) { toFid = loadingLevelRange.m_toFid; } -static TFilePath getLevelPathAndSetNameWithPsdLevelName(TXshSimpleLevel *xshLevel) { +static TFilePath getLevelPathAndSetNameWithPsdLevelName( + TXshSimpleLevel *xshLevel) { TFilePath retfp = xshLevel->getPath(); QString name = QString::fromStdWString(retfp.getWideName()); @@ -2169,8 +2170,9 @@ TFilePath TXshSimpleLevel::getExistingHookFile( } assert(h >= 0); - return (h < 0) ? TFilePath() : decodedLevelPath.getParentDir() + - TFilePath(hookFiles[h].toStdWString()); + return (h < 0) ? TFilePath() + : decodedLevelPath.getParentDir() + + TFilePath(hookFiles[h].toStdWString()); } //----------------------------------------------------------------------------- diff --git a/toonz/sources/toonzqt/camerasettingswidget.cpp b/toonz/sources/toonzqt/camerasettingswidget.cpp index 4c531d3..2da8e22 100644 --- a/toonz/sources/toonzqt/camerasettingswidget.cpp +++ b/toonz/sources/toonzqt/camerasettingswidget.cpp @@ -21,6 +21,7 @@ #include "toonz/txshsimplelevel.h" #include "toonz/txshleveltypes.h" #include "toonz/preferences.h" +#include "toonz/stage.h" // TnzCore includes #include "tconvert.h" @@ -189,11 +190,15 @@ CameraSettingsWidget::CameraSettingsWidget(bool forCleanup) m_arFld = new SimpleExpField(this); - m_xResFld = new DVGui::IntLineEdit(); - m_yResFld = new DVGui::IntLineEdit(); - m_xDpiFld = new DoubleLineEdit(); - m_yDpiFld = new DoubleLineEdit(); - + m_xResFld = new DVGui::IntLineEdit(); + m_yResFld = new DVGui::IntLineEdit(); + m_xDpiFld = new DoubleLineEdit(); + m_yDpiFld = new DoubleLineEdit(); + m_unitLabel = new QLabel(); + if (Preferences::instance()->getPixelsOnly()) + m_unitLabel->setText("Pixels"); + else + m_unitLabel->setText(Preferences::instance()->getCameraUnits()); m_dpiLabel = new QLabel(tr("DPI")); m_resLabel = new QLabel(tr("Pixels")); m_xLabel = new QLabel(tr("x")); @@ -282,9 +287,7 @@ CameraSettingsWidget::CameraSettingsWidget(bool forCleanup) gridLay->addWidget(m_yPrev, 0, 4, Qt::AlignCenter); gridLay->addWidget(m_inchPrev, 1, 0, Qt::AlignRight | Qt::AlignVCenter); - QString units = Preferences::instance()->getCameraUnits(); - gridLay->addWidget(new QLabel(units), 1, 1, - Qt::AlignRight | Qt::AlignVCenter); + gridLay->addWidget(m_unitLabel, 1, 1, Qt::AlignRight | Qt::AlignVCenter); gridLay->addWidget(m_lxFld, 1, 2); gridLay->addWidget(new QLabel("x"), 1, 3, Qt::AlignCenter); gridLay->addWidget(m_lyFld, 1, 4); @@ -380,6 +383,8 @@ void CameraSettingsWidget::showEvent(QShowEvent *e) { m_yDpiFld->hide(); m_fspChk->hide(); m_dotPrev->hide(); + m_lxFld->setDecimals(0); + m_lyFld->setDecimals(0); } else { m_resLabel->show(); m_dpiLabel->show(); @@ -390,7 +395,13 @@ void CameraSettingsWidget::showEvent(QShowEvent *e) { m_yDpiFld->show(); m_fspChk->show(); m_dotPrev->show(); + m_lxFld->setDecimals(4); + m_lyFld->setDecimals(4); } + if (Preferences::instance()->getPixelsOnly()) + m_unitLabel->setText("Pixels"); + else + m_unitLabel->setText(Preferences::instance()->getCameraUnits()); } void CameraSettingsWidget::loadPresetList() { @@ -747,7 +758,11 @@ void CameraSettingsWidget::onYResChanged() { } void CameraSettingsWidget::onXDpiChanged() { - if (m_fspChk->isChecked()) m_yDpiFld->setValue(m_xDpiFld->getValue()); + if (Preferences::instance()->getPixelsOnly()) { + m_xDpiFld->setValue(Stage::inch); + m_yDpiFld->setValue(Stage::inch); + } else if (m_fspChk->isChecked()) + m_yDpiFld->setValue(m_xDpiFld->getValue()); if (m_dotPrev->isChecked()) { vComputeLx(); @@ -765,7 +780,11 @@ void CameraSettingsWidget::onXDpiChanged() { } void CameraSettingsWidget::onYDpiChanged() { - if (m_fspChk->isChecked()) m_xDpiFld->setValue(m_yDpiFld->getValue()); + if (Preferences::instance()->getPixelsOnly()) { + m_xDpiFld->setValue(Stage::inch); + m_yDpiFld->setValue(Stage::inch); + } else if (m_fspChk->isChecked()) + m_xDpiFld->setValue(m_yDpiFld->getValue()); if (m_dotPrev->isChecked()) { vComputeLy(); @@ -830,6 +849,11 @@ void CameraSettingsWidget::onPresetSelected(const QString &str) { hComputeLx(); } + if (Preferences::instance()->getPixelsOnly()) { + m_lxFld->setValue(xres / Stage::inch); + m_lyFld->setValue(yres / Stage::inch); + } + if (m_forCleanup && m_offsX && m_offsY && !xoffset.isEmpty() && !yoffset.isEmpty()) { m_offsX->setText(xoffset); diff --git a/toonz/sources/toonzqt/cleanupcamerasettingswidget.cpp b/toonz/sources/toonzqt/cleanupcamerasettingswidget.cpp index 9a4a8d2..b02a541 100644 --- a/toonz/sources/toonzqt/cleanupcamerasettingswidget.cpp +++ b/toonz/sources/toonzqt/cleanupcamerasettingswidget.cpp @@ -3,6 +3,8 @@ #include "toonzqt/cleanupcamerasettingswidget.h" #include "toonzqt/camerasettingswidget.h" #include "toonz/cleanupparameters.h" +#include "toonz/preferences.h" +#include "toonz/stage.h" #include #include #include @@ -89,7 +91,12 @@ void CleanupCameraSettingsWidget::setCameraPresetListFile(const TFilePath &fp) { } void CleanupCameraSettingsWidget::setFields( - const CleanupParameters *cleanupParameters) { + CleanupParameters *cleanupParameters) { + if (Preferences::instance()->getPixelsOnly()) { + TDimension res = cleanupParameters->m_camera.getRes(); + cleanupParameters->m_camera.setSize( + TDimensionD(res.lx / Stage::inch, res.ly / Stage::inch)); + } m_cameraWidget->setFields(&cleanupParameters->m_camera); m_offsX->setValue(cleanupParameters->m_offx); m_offsY->setValue(cleanupParameters->m_offy); diff --git a/toonz/sources/toonzqt/docklayout.cpp b/toonz/sources/toonzqt/docklayout.cpp index 4b8ebb3..ffb0b69 100644 --- a/toonz/sources/toonzqt/docklayout.cpp +++ b/toonz/sources/toonzqt/docklayout.cpp @@ -863,8 +863,10 @@ bool DockLayout::undockItem(DockWidget *item) { //! Search for the \b nearest n-ple from a \b target one, under conditions: //!\b 1) nearest elements belong to \b fixed \b intervals; \b 2) their \b sum is //!\b fixed too. -static void calculateNearest(std::vector target, std::vector &nearest, - std::vector> intervals, double sum) { +static void calculateNearest(std::vector target, + std::vector &nearest, + std::vector> intervals, + double sum) { // Solving a small Lagrange multipliers problem to find solution on constraint // (2) assert(target.size() == intervals.size()); diff --git a/toonz/sources/toonzqt/imageutils.cpp b/toonz/sources/toonzqt/imageutils.cpp index eb2b869..24fcf11 100644 --- a/toonz/sources/toonzqt/imageutils.cpp +++ b/toonz/sources/toonzqt/imageutils.cpp @@ -337,11 +337,11 @@ void getStrokeStyleInformationInArea( } //-------------------------------------------------------------------- -static void convertFromCM(const TLevelReaderP &lr, const TPaletteP &plt, - const TLevelWriterP &lw, const std::vector &frames, - const TAffine &aff, const TRop::ResampleFilterType &resType, - FrameTaskNotifier *frameNotifier, const TPixel &bgColor, - bool removeDotBeforeFrameNumber = false) { +static void convertFromCM( + const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWriterP &lw, + const std::vector &frames, const TAffine &aff, + const TRop::ResampleFilterType &resType, FrameTaskNotifier *frameNotifier, + const TPixel &bgColor, bool removeDotBeforeFrameNumber = false) { for (int i = 0; i < (int)frames.size(); i++) { if (frameNotifier->abortTask()) break; try { @@ -403,7 +403,8 @@ static void convertFromCM(const TLevelReaderP &lr, const TPaletteP &plt, //-------------------------------------------------------------------- static void convertFromVI(const TLevelReaderP &lr, const TPaletteP &plt, - const TLevelWriterP &lw, const std::vector &frames, + const TLevelWriterP &lw, + const std::vector &frames, const TRop::ResampleFilterType &resType, int width, FrameTaskNotifier *frameNotifier) { QString msg; @@ -457,13 +458,11 @@ static void convertFromVI(const TLevelReaderP &lr, const TPaletteP &plt, //----------------------------------------------------------------------- -static void convertFromFullRaster(const TLevelReaderP &lr, const TLevelWriterP &lw, - const std::vector &_frames, - const TAffine &aff, - const TRop::ResampleFilterType &resType, - FrameTaskNotifier *frameNotifier, - const TPixel &bgColor, - bool removeDotBeforeFrameNumber = false) { +static void convertFromFullRaster( + const TLevelReaderP &lr, const TLevelWriterP &lw, + const std::vector &_frames, const TAffine &aff, + const TRop::ResampleFilterType &resType, FrameTaskNotifier *frameNotifier, + const TPixel &bgColor, bool removeDotBeforeFrameNumber = false) { std::vector frames = _frames; if (frames.empty() && lr->loadInfo()->getFrameCount() == diff --git a/toonz/sources/toonzqt/pluginhost.cpp b/toonz/sources/toonzqt/pluginhost.cpp index 3d271ce..39b8565 100644 --- a/toonz/sources/toonzqt/pluginhost.cpp +++ b/toonz/sources/toonzqt/pluginhost.cpp @@ -433,7 +433,7 @@ TFx *RasterFxPluginHost::clone(bool recursive) const { } } - printf("recursive:%d params:%d\n", recursive, params_.size()); + printf("recursive:%d params:%d\n", (int)recursive, (int)params_.size()); // clone params before TFx::clone(). /* ui_pages_, param_views_ は pi に移ったが createParam * の呼び出しだけはしておかないと Fx Settings 構築時に assert failed になる */ @@ -628,7 +628,7 @@ ParamView *RasterFxPluginHost::createParamView() { * 通常一度だけ呼ばれ使い回される. */ void RasterFxPluginHost::build(ParamsPageSet *pages) { printf(">>>> RasterFxPluginHost::build: ui_pages:%d\n", - pi_->ui_pages_.size()); + (int)pi_->ui_pages_.size()); for (std::size_t i = 0, size = pi_->ui_pages_.size(); i < size; ++i) { pi_->ui_pages_[i]->build(this, pages); } @@ -959,7 +959,7 @@ static inline bool check(const plugin_probe_t *begin, int idx = 0; if (!is_compatible(*begin)) { #if defined(VERBOSE) - printf("sanity check(): first interface version is unknown\n", idx); + printf("sanity check(): first interface version is unknown\n"); #endif return false; }