Skip to content

Commit 45a06de

Browse files
committed
Merged branch 'feature08_assistants' by blackwarthog with conflicts resolved
2 parents 3ea336c + 688bf20 commit 45a06de

File tree

7 files changed

+17
-19
lines changed

7 files changed

+17
-19
lines changed

toonz/sources/include/tgeometry.h

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -634,14 +634,14 @@ TRectI is empty if x0>x1 || y0>y1 */
634634
TPointT<T> getP11() const { return TPointT<T>(x1, y1); };
635635

636636
//! Returns the union of two source rectangles.
637-
//!The union is the smallest rectangle that contains both source rectangles.
637+
//! The union is the smallest rectangle that contains both source rectangles.
638638
TRectT<T> operator+(const TRectT<T> &rect) const { // unione
639639
if (isEmpty())
640640
return rect;
641641
else if (rect.isEmpty())
642642
return *this;
643643
else
644-
return TRectT<T>(std::min((T)x0, (T)rect.x0),
644+
return TRectT<T>(std::min((T)x0, (T)rect.x0),
645645
std::min((T)y0, (T)rect.y0),
646646
std::max((T)x1, (T)rect.x1),
647647
std::max((T)y1, (T)rect.y1));
@@ -653,8 +653,8 @@ TRectI is empty if x0>x1 || y0>y1 */
653653
return *this = *this * rect;
654654
};
655655

656-
//!Returns the intersection of two existing rectangles.
657-
//The intersection is the largest rectangle contained in both existing rectangles.
656+
//! Returns the intersection of two existing rectangles.
657+
//! The intersection is the largest rectangle contained in both existing rectangles.
658658
TRectT<T> operator*(const TRectT<T> &rect) const { // intersezione
659659
if (isEmpty() || rect.isEmpty())
660660
return TRectT<T>();
@@ -735,7 +735,6 @@ template class DVAPI TRectT<double>;
735735
\relates TRectT
736736
Convert a TRectD into a TRect
737737
*/
738-
739738
inline TRect convert(const TRectD &r) {
740739
return TRect((int)(r.x0 + 0.5), (int)(r.y0 + 0.5), (int)(r.x1 + 0.5),
741740
(int)(r.y1 + 0.5));
@@ -752,8 +751,8 @@ inline TRectD convert(const TRect &r) { return TRectD(r.x0, r.y0, r.x1, r.y1); }
752751
\relates TPointT
753752
*/
754753
inline TRectD boundingBox(const TPointD &p0, const TPointD &p1) {
755-
return TRectD(std::min(p0.x, p1.x), std::min(p0.y, p1.y), // bottom left
756-
std::max(p0.x, p1.x), std::max(p0.y, p1.y)); // top right
754+
return TRectD(std::min(p0.x, p1.x), std::min(p0.y, p1.y), // bottom left
755+
std::max(p0.x, p1.x), std::max(p0.y, p1.y)); // top right
757756
}
758757
/*!
759758
\relates TRectT
@@ -800,8 +799,6 @@ inline void TRectT<int>::empty() {
800799
x0 = y0 = 0;
801800
x1 = y1 = -1;
802801
}
803-
804-
// Is the adding of one here to account for the thickness?
805802
template <>
806803
inline int TRectT<int>::getLx() const {
807804
return x1 >= x0 ? x1 - x0 + 1 : 0;
@@ -894,9 +891,9 @@ extern DVVAR const TRectI infiniteRectI;
894891
//=============================================================================
895892
//! This is the base class for the affine transformations.
896893
/*!
897-
This class performs basic manipulations of affine transformations.
898-
An affine transformation is a linear transformation followed by a translation.
899-
894+
This class performs basic manipulations of affine transformations.
895+
An affine transformation is a linear transformation followed by a translation.
896+
900897
[a11, a12, a13]
901898
[a21, a22, a23]
902899

toonz/sources/tnztools/inputmanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ void TInputManager::draw() {
757757
TToolViewer *viewer = getViewer();
758758

759759
// paint not sent sub-tracks
760-
if (debugInputManagerTracks || m_savePointsSent < (int)m_savePoints.size()) {
760+
if (debugInputManagerTracks /* || m_savePointsSent < (int)m_savePoints.size() */) {
761761
glPushAttrib(GL_ALL_ATTRIB_BITS);
762762
tglEnableBlending();
763763
tglEnableLineSmooth(true, 0.5);

toonz/sources/tnztools/plastictool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ PlasticTool::PlasticTool()
642642
, m_showSkeletonOS(true)
643643
, m_recompileOnMouseRelease(false) {
644644
// And now, a little trick about tool binding
645-
bind(TTool::AllImages); // Attach the tool to all types :)
645+
bind(TTool::AllImages | TTool::EmptyTarget); // Attach the tool to all types :)
646646
bind(TTool::MeshLevels); // But disable it for all but meshes :0
647647

648648
// This little trick is needed to associate the tool to common levels (the

toonz/sources/tnztools/toonzrasterbrushtool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ void ToonzRasterBrushTool::leftButtonDown(const TPointD &pos,
11351135
m_tileSaver->save(m_rasterTrack->getLastRect());
11361136
m_rasterTrack->generateLastPieceOfStroke(m_pencil.getValue());
11371137

1138-
m_smoothStroke.beginStroke(4*m_smooth.getValue());
1138+
m_smoothStroke.beginStroke(m_smooth.getValue());
11391139
m_smoothStroke.points().clear();
11401140
m_smoothStroke.addPoint(thickPoint);
11411141
} else {
@@ -1155,7 +1155,7 @@ void ToonzRasterBrushTool::leftButtonDown(const TPointD &pos,
11551155
m_styleId, drawOrder);
11561156
m_lastRect = m_strokeRect;
11571157

1158-
m_smoothStroke.beginStroke(4*m_smooth.getValue());
1158+
m_smoothStroke.beginStroke(m_smooth.getValue());
11591159
m_smoothStroke.points().clear();
11601160
m_smoothStroke.addPoint(point);
11611161
}

toonz/sources/tnztools/toonzvectorbrushtool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ void ToonzVectorBrushTool::leftButtonDown(const TPointD &pos,
728728
if (m_pressure.getValue() && e.m_pressure == 1.0)
729729
thickness = m_thickness.getValue().first * 0.5;
730730
m_currThickness = thickness;
731-
m_smoothStroke.beginStroke(4*m_smooth.getValue());
731+
m_smoothStroke.beginStroke(m_smooth.getValue());
732732

733733
if (m_foundFirstSnap) {
734734
addTrackPoint(TThickPoint(m_firstSnapPoint, thickness),

toonz/sources/toonz/viewerpane.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ void SceneViewerPanel::showEvent(QShowEvent *event) {
351351

352352
assert(ret);
353353

354+
m_sceneViewer->onToolSwitched();
355+
354356
// Aggiorno FPS al valore definito nel viewer corrente.
355357
// frameHandle->setPreviewFrameRate(m_fpsSlider->value());
356358
m_flipConsole->setActive(true);

toonz/sources/toonzlib/toonzscene.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,7 @@ static LevelType getLevelType(const TFilePath &fp) {
10471047
case TFileType::META_IMAGE:
10481048
case TFileType::META_LEVEL:
10491049
ret.m_ltype = META_XSHLEVEL;
1050-
break;
1051-
1050+
10521051
default:
10531052
break;
10541053
}

0 commit comments

Comments
 (0)