OpenToonz - An open-source full-featured 2D animation creation software
C
fix: initialize `popup`, `firstW`, and `lastW`
Anderson Pradocb05abb8c11e
diff --git a/toonz/sources/colorfx/flowlinestrokestyle.cpp b/toonz/sources/colorfx/flowlinestrokestyle.cppindex 0159c0ec5..4fb2cebde 100644--- a/toonz/sources/colorfx/flowlinestrokestyle.cpp+++ b/toonz/sources/colorfx/flowlinestrokestyle.cpp@@ -50,7 +50,7 @@ bool isCuspPoint(const TPointD &p0, const TPointD &p1, const TPointD &p2) {p2_p1 = p2_p1 * (1.0 / n2);return (p0_p1 * p2_p1 > 0) ||- (fabs(cross(p0_p1, p2_p1)) > 0.09); // more than 5�� is yes+ (fabs(cross(p0_p1, p2_p1)) > 0.09); // more than 5° is yes// Distance-based check. Unscalable...// return@@ -66,9 +66,9 @@ void insertPoint(TStroke *stroke, int indexA, int indexB) {int chunkCount = indexB - indexA;if (chunkCount % 2 == 0) return;double length = 0;- double firstW, lastW;+ double firstW = 0.0, lastW = 0.0;for (j = indexA; j < indexB; j++) {- // cerco il chunk piu' lungo+ // search for the longest chunkdouble w0 = stroke->getW(stroke->getChunk(j)->getP0());double w1;if (j == stroke->getChunkCount() - 1)@@ -83,6 +83,7 @@ void insertPoint(TStroke *stroke, int indexA, int indexB) {length = length1 - length0;}}+ // Insert a control point at the midpoint of the longest chunkstroke->insertControlPoints((firstW + lastW) * 0.5);}}; // namespace@@ -219,7 +220,7 @@ void FlowLineStrokeStyle::drawStroke(const TColorFunction *cf,// Length and position of the stroke is in "actual size" (i.e. not in pixels).// 1unit = 1/53.3333inches- // Stroke�̒�������W�͎����i�P�P�ʁ�1/53.3333�C���`�j+ // Strokeの長さや座標は実寸(1単位=1/53.3333インチ)double length = stroke->getLength();if (length <= 0) return;@@ -270,7 +271,7 @@ void FlowLineStrokeStyle::drawStroke(const TColorFunction *cf,}insertPoint(tmpStroke, 0, secondChunk);- // thin lines amount �א��̖{��+ // thin lines amount 細線の本数int count = 2 * (int)std::ceil(maxThickness * m_density) - 1;TPixel32 color;@@ -316,15 +317,15 @@ void FlowLineStrokeStyle::drawStroke(const TColorFunction *cf,float2 *vp = vertBuf;for (int j = 0; j <= divAmount; j++, vp++) {- // current position ratio ���̍��W�̊����ʒu+ // current position ratio 今の座標の割合位置double t = double(j) / double(divAmount);- // position ratio on the stroke �X�g���[�N���ratio�ʒu+ // position ratio on the stroke ストローク上のratio位置double w = t;- // unit vector perpendicular to the stroke ���������̒P�ʃx�N�g��+ // unit vector perpendicular to the stroke 鉛直方向の単位ベクトルTPointD v = rotate90(normalize(tmpStroke->getSpeed(w)));assert(0 <= w && w <= 1);- // position on the stroke �X�g���[�N��̈ʒu+ // position on the stroke ストローク上の位置TPointD p = tmpStroke->getPoint(w);TPointD pos = p + v * maxThickness * widthRatio;diff --git a/toonz/sources/toonzfarm/tfarmclient/submitpage.cpp b/toonz/sources/toonzfarm/tfarmclient/submitpage.cppindex e9412b93b..8d0dcb578 100644--- a/toonz/sources/toonzfarm/tfarmclient/submitpage.cpp+++ b/toonz/sources/toonzfarm/tfarmclient/submitpage.cpp@@ -263,7 +263,7 @@ void SubmitPage::Data::configureNotify(const TDimension &size) {void SubmitPage::Data::browseCasmFiles() {static FileBrowserPopup *puCasm = 0L;static FileBrowserPopup *puScript = 0L;- FileBrowserPopup *popup;+ FileBrowserPopup *popup = 0L;if (m_taskType->getText() == "Casm") {if (!puCasm) {