Skip to content

Commit 13a0f84

Browse files
committed
More consistent string conversion of nodes.
1 parent 4d1ca5c commit 13a0f84

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

Sources/Modeler/Shape.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,18 @@ ShapePtr PlatonicShape::Clone () const
277277

278278
std::wstring PlatonicShape::ToString () const
279279
{
280+
switch (type) {
281+
case PlatonicSolidType::Tetrahedron:
282+
return L"Tetrahedron";
283+
case PlatonicSolidType::Octahedron:
284+
return L"Octahedron";
285+
case PlatonicSolidType::Hexahedron:
286+
return L"Hexahedron";
287+
case PlatonicSolidType::Dodecahedron:
288+
return L"Dodecahedron";
289+
case PlatonicSolidType::Icosahedron:
290+
return L"Icosahedron";
291+
}
280292
return L"Platonic";
281293
}
282294

Sources/VisualScriptNodes/Basic3DNodeValues.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@ NE::ValuePtr TransformationValue::Clone () const
184184

185185
std::wstring TransformationValue::ToString (const NE::StringSettings&) const
186186
{
187-
// TODO
188187
std::wstring result;
189-
result += L"transformation";
188+
result += L"Transformation";
190189
return result;
191190
}
192191

Sources/VisualScriptNodes/MaterialNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ std::wstring MaterialValue::ToString (const NE::StringSettings&) const
3030
{
3131
std::wstring result;
3232
const glm::dvec3& color = val.GetColor ();
33-
result += L"rgb (";
33+
result += L"Material (";
3434
result += std::to_wstring (int (color.x * 255.0f)) + L", ";
3535
result += std::to_wstring (int (color.y * 255.0f)) + L", ";
3636
result += std::to_wstring (int (color.z * 255.0f));

0 commit comments

Comments
 (0)